//-----------------------------------------------------------------------
//
// Copyright (c) Andrew Arnott. All rights reserved.
//
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.OAuth2 {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotNetOpenAuth.OAuth2.Messages;
using Validation;
///
/// Describes the result of an automated authorization check, such as for client credential or resource owner password grants.
///
public class AutomatedAuthorizationCheckResponse {
///
/// Initializes a new instance of the class.
///
/// The access token request.
/// A value indicating whether the authorization should be approved.
public AutomatedAuthorizationCheckResponse(IAccessTokenRequest accessRequest, bool approved) {
Requires.NotNull(accessRequest, "accessRequest");
this.IsApproved = approved;
this.ApprovedScope = new HashSet(accessRequest.Scope);
}
///
/// Gets a value indicating whether the authorization should be approved.
///
public bool IsApproved { get; private set; }
///
/// Gets the scope to be granted.
///
public HashSet ApprovedScope { get; private set; }
}
}