C# Class DotNetOpenAuth.OAuth2.AuthorizationServer

Authorization Server supporting the web server flow.
Afficher le fichier Open project: OneCare/dotnetopenid Class Usage Examples

Méthodes publiques

Méthode Description
ApproveAuthorizationRequest ( DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest authorizationRequest, string userName, IEnumerable scopes = null, Uri callback = null ) : void

Approves an authorization request and sends an HTTP response to the user agent to redirect the user back to the Client.

AuthorizationServer ( IAuthorizationServer authorizationServer ) : System

Initializes a new instance of the AuthorizationServer class.

HandleTokenRequest ( System.Web.HttpRequestBase request = null ) : DotNetOpenAuth.Messaging.OutgoingWebResponse

Handles an incoming request to the authorization server's token endpoint.

PrepareApproveAuthorizationRequest ( DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest authorizationRequest, string userName, IEnumerable scopes = null, Uri callback = null ) : DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationSuccessResponseBase

Approves an authorization request.

PrepareRejectAuthorizationRequest ( DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest authorizationRequest, Uri callback = null ) : DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationFailedResponse

Prepares a response to inform the Client that the user has rejected the Client's authorization request.

RejectAuthorizationRequest ( EndUserAuthorizationRequest authorizationRequest, Uri callback = null ) : void

Rejects an authorization request and sends an HTTP response to the user agent to redirect the user back to the Client.

Méthodes protégées

Méthode Description
GetCallback ( DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest authorizationRequest ) : Uri

Gets the redirect URL to use for a particular authorization request.

Private Methods

Méthode Description
PrepareAccessTokenResponse ( DotNetOpenAuth.OAuth2.Messages.AccessTokenRequestBase request, bool includeRefreshToken = true ) : DotNetOpenAuth.OAuth2.Messages.AccessTokenSuccessResponse

Prepares the response to an access token request.

ReadAuthorizationRequest ( System.Web.HttpRequestBase request = null ) : DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest

Method Details

ApproveAuthorizationRequest() public méthode

Approves an authorization request and sends an HTTP response to the user agent to redirect the user back to the Client.
public ApproveAuthorizationRequest ( DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest authorizationRequest, string userName, IEnumerable scopes = null, Uri callback = null ) : void
authorizationRequest DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest The authorization request to approve.
userName string The username of the account that approved the request (or whose data will be accessed by the client).
scopes IEnumerable The scope of access the client should be granted. If null, all scopes in the original request will be granted.
callback System.Uri The Client callback URL to use when formulating the redirect to send the user agent back to the Client.
Résultat void

AuthorizationServer() public méthode

Initializes a new instance of the AuthorizationServer class.
public AuthorizationServer ( IAuthorizationServer authorizationServer ) : System
authorizationServer IAuthorizationServer The authorization server.
Résultat System

GetCallback() protected méthode

Gets the redirect URL to use for a particular authorization request.
Thrown if no callback URL could be determined.
protected GetCallback ( DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest authorizationRequest ) : Uri
authorizationRequest DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest The authorization request.
Résultat System.Uri

HandleTokenRequest() public méthode

Handles an incoming request to the authorization server's token endpoint.
public HandleTokenRequest ( System.Web.HttpRequestBase request = null ) : DotNetOpenAuth.Messaging.OutgoingWebResponse
request System.Web.HttpRequestBase The HTTP request.
Résultat DotNetOpenAuth.Messaging.OutgoingWebResponse

PrepareApproveAuthorizationRequest() public méthode

Approves an authorization request.
public PrepareApproveAuthorizationRequest ( DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest authorizationRequest, string userName, IEnumerable scopes = null, Uri callback = null ) : DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationSuccessResponseBase
authorizationRequest DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest The authorization request to approve.
userName string The username of the account that approved the request (or whose data will be accessed by the client).
scopes IEnumerable The scope of access the client should be granted. If null, all scopes in the original request will be granted.
callback System.Uri The Client callback URL to use when formulating the redirect to send the user agent back to the Client.
Résultat DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationSuccessResponseBase

PrepareRejectAuthorizationRequest() public méthode

Prepares a response to inform the Client that the user has rejected the Client's authorization request.
public PrepareRejectAuthorizationRequest ( DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest authorizationRequest, Uri callback = null ) : DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationFailedResponse
authorizationRequest DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationRequest The authorization request.
callback System.Uri The Client callback URL to use when formulating the redirect to send the user agent back to the Client.
Résultat DotNetOpenAuth.OAuth2.Messages.EndUserAuthorizationFailedResponse

RejectAuthorizationRequest() public méthode

Rejects an authorization request and sends an HTTP response to the user agent to redirect the user back to the Client.
public RejectAuthorizationRequest ( EndUserAuthorizationRequest authorizationRequest, Uri callback = null ) : void
authorizationRequest EndUserAuthorizationRequest The authorization request to disapprove.
callback Uri The Client callback URL to use when formulating the redirect to send the user agent back to the Client.
Résultat void