C# Class WindowsAzure.Acs.Oauth2.ApplicationRegistrationService

Inheritance: IApplicationRegistrationService
ファイルを表示 Open project: maartenba/WindowsAzure.Acs.Oauth2 Class Usage Examples

Public Methods

Method Description
ApplicationRegistrationService ( ) : System

Initializes a new instance of the ApplicationRegistrationService class. The parameters are read from the application configuration's appSettings keys 'WindowsAzure.OAuth.ServiceNamespace', 'WindowsAzure.OAuth.ServiceNamespaceManagementUserName', 'WindowsAzure.OAuth.ServiceNamespaceManagementUserKey' and 'WindowsAzure.OAuth.RelyingPartyName'.

ApplicationRegistrationService ( string serviceNamespace, string serviceNamespaceManagementUserName, string serviceNamespaceManagementUserKey, string relyingPartyName ) : System

Initializes a new instance of the ApplicationRegistrationService class.

DelegationExists ( string clientId, AuthorizationServerIdentity delegatedIdentity, string scope ) : bool

Verify if a delegation exists.

GetApplication ( string clientId ) : ApplicationRegistration

Gets an application.

GetAuthorizationCode ( string clientId, AuthorizationServerIdentity delegatedIdentity, string scope ) : string

Gets the authorization code.

GetDelegatedApplications ( string nameIdentifier, string identityProvider ) : IEnumerable

Gets the delegated applications.

RegisterApplication ( string clientId, string clientSecret, string redirectUri, string name ) : void

Registers an application.

RemoveApplication ( string clientId ) : void

Removes an application.

RemoveDelegation ( string clientId, string nameIdentifier, string identityProvider ) : void

Removes the delegation.

UpdateApplicationClientSecret ( string clientId, string clientSecret ) : void

Updates an application client secret.

UpdateApplicationRedirectUri ( string clientId, string redirectUri ) : void

Updates an application redirect Uri.

ValidateIncomingRequest ( OAuthMessage message, string &errorCode, string &errorDescription ) : bool

This method validates the incoming request.

ValidateServiceIdentity ( OAuthMessage message, string &errorCode, string &errorDescription ) : bool

Checks if the client_id and the redirect_uri are valid.

Protected Methods

Method Description
CreateManagementServiceClient ( ) : FluentACS.ManagementService.ManagementService

Creates the management service client.

Method Details

ApplicationRegistrationService() public method

Initializes a new instance of the ApplicationRegistrationService class. The parameters are read from the application configuration's appSettings keys 'WindowsAzure.OAuth.ServiceNamespace', 'WindowsAzure.OAuth.ServiceNamespaceManagementUserName', 'WindowsAzure.OAuth.ServiceNamespaceManagementUserKey' and 'WindowsAzure.OAuth.RelyingPartyName'.
public ApplicationRegistrationService ( ) : System
return System

ApplicationRegistrationService() public method

Initializes a new instance of the ApplicationRegistrationService class.
public ApplicationRegistrationService ( string serviceNamespace, string serviceNamespaceManagementUserName, string serviceNamespaceManagementUserKey, string relyingPartyName ) : System
serviceNamespace string The service namespace.
serviceNamespaceManagementUserName string Name of the service namespace management user.
serviceNamespaceManagementUserKey string The service namespace management user key.
relyingPartyName string The relying party name.
return System

CreateManagementServiceClient() protected method

Creates the management service client.
protected CreateManagementServiceClient ( ) : FluentACS.ManagementService.ManagementService
return FluentACS.ManagementService.ManagementService

DelegationExists() public method

Verify if a delegation exists.
public DelegationExists ( string clientId, AuthorizationServerIdentity delegatedIdentity, string scope ) : bool
clientId string The client id.
delegatedIdentity AuthorizationServerIdentity The delegated identity.
scope string The scope.
return bool

GetApplication() public method

Gets an application.
public GetApplication ( string clientId ) : ApplicationRegistration
clientId string The client id.
return ApplicationRegistration

GetAuthorizationCode() public method

Gets the authorization code.
public GetAuthorizationCode ( string clientId, AuthorizationServerIdentity delegatedIdentity, string scope ) : string
clientId string The client id.
delegatedIdentity AuthorizationServerIdentity The delegated identity.
scope string The scope.
return string

GetDelegatedApplications() public method

Gets the delegated applications.
public GetDelegatedApplications ( string nameIdentifier, string identityProvider ) : IEnumerable
nameIdentifier string The name identifier.
identityProvider string The identity provider.
return IEnumerable

RegisterApplication() public method

Registers an application.
public RegisterApplication ( string clientId, string clientSecret, string redirectUri, string name ) : void
clientId string The client id.
clientSecret string The client secret.
redirectUri string The redirect URI.
name string The name.
return void

RemoveApplication() public method

Removes an application.
public RemoveApplication ( string clientId ) : void
clientId string The client id.
return void

RemoveDelegation() public method

Removes the delegation.
public RemoveDelegation ( string clientId, string nameIdentifier, string identityProvider ) : void
clientId string The client id.
nameIdentifier string The name identifier.
identityProvider string The identity provider.
return void

UpdateApplicationClientSecret() public method

Updates an application client secret.
public UpdateApplicationClientSecret ( string clientId, string clientSecret ) : void
clientId string The client id.
clientSecret string The client secret.
return void

UpdateApplicationRedirectUri() public method

Updates an application redirect Uri.
public UpdateApplicationRedirectUri ( string clientId, string redirectUri ) : void
clientId string The client id.
redirectUri string The redirect URI.
return void

ValidateIncomingRequest() public method

This method validates the incoming request.
public ValidateIncomingRequest ( OAuthMessage message, string &errorCode, string &errorDescription ) : bool
message OAuthMessage The incoming reequest message.
errorCode string The error code.
errorDescription string Description of the error.
return bool

ValidateServiceIdentity() public method

Checks if the client_id and the redirect_uri are valid.
public ValidateServiceIdentity ( OAuthMessage message, string &errorCode, string &errorDescription ) : bool
message OAuthMessage The message which contains the client_id and redirect_uri.
errorCode string The error code.
errorDescription string Description of the error.
return bool