//----------------------------------------------------------------------- // // 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 for resource owner grants. /// public class AutomatedUserAuthorizationCheckResponse : AutomatedAuthorizationCheckResponse { /// /// Initializes a new instance of the class. /// /// The access token request. /// A value indicating whether the authorization should be approved. /// /// Canonical username of the authorizing user (resource owner), as the resource server would recognize it. /// Ignored if is false. /// public AutomatedUserAuthorizationCheckResponse(IAccessTokenRequest accessRequest, bool approved, string canonicalUserName) : base(accessRequest, approved) { if (approved) { Requires.NotNullOrEmpty(canonicalUserName, "canonicalUserName"); } this.CanonicalUserName = canonicalUserName; } /// /// Gets the canonical username of the authorizing user (resource owner). /// public string CanonicalUserName { get; private set; } } }