//----------------------------------------------------------------------- // // Copyright (c) Outercurve Foundation. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.OAuth2.Messages { using System; using System.Collections.Generic; using System.Linq; using System.Text; using DotNetOpenAuth.Messaging; using DotNetOpenAuth.OAuth2.ChannelElements; /// /// A message sent by a web application Client to the AuthorizationServer /// via the user agent to obtain authorization from the user and prepare /// to issue an access token to the client if permission is granted. /// [Serializable] public class EndUserAuthorizationImplicitRequest : EndUserAuthorizationRequest, IAccessTokenRequestInternal { /// /// Gets or sets the grant type that the client expects of the authorization server. /// /// Always . Other response types are not supported. [MessagePart(Protocol.response_type, IsRequired = true, Encoder = typeof(EndUserAuthorizationResponseTypeEncoder))] private const EndUserAuthorizationResponseType ResponseTypeConst = EndUserAuthorizationResponseType.AccessToken; /// /// Initializes a new instance of the class. /// /// The Authorization Server's user authorization URL to direct the user to. /// The protocol version. protected EndUserAuthorizationImplicitRequest(Uri authorizationEndpoint, Version version) : base(authorizationEndpoint, version) { } /// /// Gets the grant type that the client expects of the authorization server. /// public override EndUserAuthorizationResponseType ResponseType { get { return ResponseTypeConst; } } /// /// Gets or sets the result of calling the authorization server host's access token creation method. /// AccessTokenResult IAccessTokenRequestInternal.AccessTokenResult { get; set; } /// /// Gets a value indicating whether the client requesting the access token has authenticated itself. /// /// /// Always false because authorization requests only include the client_id, without a secret. /// bool IAccessTokenRequest.ClientAuthenticated { get { return false; } } } }