// ----------------------------------------------------------------------- // // TODO: Update copyright text. // // ----------------------------------------------------------------------- namespace DotNetOpenAuth.OAuth2.Messages { using System; using System.Collections.Generic; using System.Linq; using System.Text; using DotNetOpenAuth.OAuth2.ChannelElements; /// /// TODO: Update summary. /// internal class EndUserAuthorizationSuccessAuthCodeResponseAS : EndUserAuthorizationSuccessAuthCodeResponse, IAuthorizationCodeCarryingRequest { /// /// Initializes a new instance of the class. /// /// The URL to redirect to so the client receives the message. This may not be built into the request message if the client pre-registered the URL with the authorization server. /// The protocol version. internal EndUserAuthorizationSuccessAuthCodeResponseAS(Uri clientCallback, Version version) : base(clientCallback, version) { Requires.NotNull(version, "version"); Requires.NotNull(clientCallback, "clientCallback"); } /// /// Initializes a new instance of the class. /// /// The URL to redirect to so the client receives the message. This may not be built into the request message if the client pre-registered the URL with the authorization server. /// The authorization request from the user agent on behalf of the client. internal EndUserAuthorizationSuccessAuthCodeResponseAS(Uri clientCallback, EndUserAuthorizationRequest request) : base(clientCallback, request) { Requires.NotNull(clientCallback, "clientCallback"); Requires.NotNull(request, "request"); ((IMessageWithClientState)this).ClientState = request.ClientState; } #region IAuthorizationCodeCarryingRequest Members /// /// Gets or sets the authorization code. /// string IAuthorizationCodeCarryingRequest.Code { get { return this.AuthorizationCode; } set { this.AuthorizationCode = value; } } /// /// Gets or sets the authorization that the token describes. /// AuthorizationCode IAuthorizationCodeCarryingRequest.AuthorizationDescription { get; set; } /// /// Gets the authorization that the code describes. /// IAuthorizationDescription IAuthorizationCarryingRequest.AuthorizationDescription { get { return ((IAuthorizationCodeCarryingRequest)this).AuthorizationDescription; } } #endregion } }