C# 클래스 nonintanon.Security.OAuth.OAuthWebSecurity

Contains APIs to manage authentication against OAuth & OpenID service providers
파일 보기 프로젝트 열기: nonintanon/SimpleGuidMembershipProvider

공개 메소드들

메소드 설명
CreateOrUpdateAccount ( string providerName, string providerUserId, string userName ) : void

Creates or update the account with the specified provider, provider user id and associate it with the specified user name.

DeleteAccount ( string providerName, string providerUserId ) : bool

Delete the specified OAuth & OpenID account

GetAccountsFromUserName ( string userName ) : ICollection

Gets all OAuth & OpenID accounts which are associted with the specified user name.

GetOAuthClientData ( string providerName ) : Microsoft.Web.WebPages.OAuth.AuthenticationClientData

Gets the OAuth client data of the specified provider name.

GetUserName ( string providerName, string providerUserId ) : string

Gets the registered user name corresponding to the specified provider and provider user id.

HasLocalAccount ( System.Guid userId ) : bool

Determines whether there exists a local account (as opposed to OAuth account) with the specified userId.

RegisterFacebookClient ( string appId, string appSecret ) : void

Registers the Facebook client.

RegisterFacebookClient ( string appId, string appSecret, string displayName ) : void

Registers the Facebook client.

RegisterFacebookClient ( string appId, string appSecret, string displayName, object>.IDictionary extraData ) : void

Registers the Facebook client.

RegisterGoogleClient ( ) : void

Registers the Google client.

RegisterGoogleClient ( string displayName ) : void

Registers the Google client.

RegisterGoogleClient ( string displayName, object>.IDictionary extraData ) : void

Registers the Google client.

RegisterLinkedInClient ( string consumerKey, string consumerSecret ) : void

Registers the LinkedIn client.

RegisterLinkedInClient ( string consumerKey, string consumerSecret, string displayName ) : void

Registers the LinkedIn client.

RegisterLinkedInClient ( string consumerKey, string consumerSecret, string displayName, object>.IDictionary extraData ) : void

Registers the LinkedIn client.

RegisterMicrosoftClient ( string clientId, string clientSecret ) : void

Registers the Microsoft account client.

RegisterMicrosoftClient ( string clientId, string clientSecret, string displayName ) : void

Registers the Microsoft account client.

RegisterMicrosoftClient ( string clientId, string clientSecret, string displayName, object>.IDictionary extraData ) : void

Registers the Microsoft account client.

RegisterTwitterClient ( string consumerKey, string consumerSecret ) : void

Registers the Twitter client.

RegisterTwitterClient ( string consumerKey, string consumerSecret, string displayName ) : void

Registers the Twitter client.

RegisterTwitterClient ( string consumerKey, string consumerSecret, string displayName, object>.IDictionary extraData ) : void

Registers the Twitter client.

RegisterYahooClient ( ) : void

Registers the Yahoo client.

RegisterYahooClient ( string displayName ) : void

Registers the Yahoo client.

RegisterYahooClient ( string displayName, object>.IDictionary extraData ) : void

Registers the Yahoo client.

RequestAuthentication ( string provider ) : void

Requests the specified provider to start the authentication by directing users to an external website

SerializeProviderUserId ( string providerName, string providerUserId ) : string

Securely serializes a providerName/providerUserId pair.

Do not persist the return value to permanent storage. This implementation is subject to change.

TryGetOAuthClientData ( string providerName, AuthenticationClientData &clientData ) : bool

Tries getting the OAuth client data of the specified provider name.

비공개 메소드들

메소드 설명
ClearProviders ( ) : void

for unit tests

GetIsAuthenticatedWithOAuthCore ( System.Web.HttpContextBase context ) : bool
GetOAuthClient ( string providerName ) : IAuthenticationClient
Login ( string providerName, string providerUserId, bool createPersistentCookie ) : bool
LoginCore ( System.Web.HttpContextBase context, string providerName, string providerUserId, bool createPersistentCookie ) : bool
RegisterClient ( IAuthenticationClient client ) : void
RegisterClient ( IAuthenticationClient client, string displayName, object>.IDictionary extraData ) : void
RequestAuthentication ( string provider, string returnUrl ) : void
RequestAuthenticationCore ( HttpContextBase context, string provider, string returnUrl ) : void

Requests the authentication core.

TryDeserializeProviderUserId ( string data, string &providerName, string &providerUserId ) : bool
TryGetOAuthClient ( string provider, IAuthenticationClient &client ) : bool
VerifyAuthentication ( ) : AuthenticationResult
VerifyAuthentication ( string returnUrl ) : AuthenticationResult
VerifyAuthenticationCore ( HttpContextBase context, string returnUrl ) : AuthenticationResult
VerifyProvider ( ) : GuidExtendedMembershipProvider

메소드 상세

CreateOrUpdateAccount() 공개 정적인 메소드

Creates or update the account with the specified provider, provider user id and associate it with the specified user name.
public static CreateOrUpdateAccount ( string providerName, string providerUserId, string userName ) : void
providerName string Name of the provider.
providerUserId string The provider user id.
userName string The user name.
리턴 void

DeleteAccount() 공개 정적인 메소드

Delete the specified OAuth & OpenID account
public static DeleteAccount ( string providerName, string providerUserId ) : bool
providerName string Name of the provider.
providerUserId string The provider user id.
리턴 bool

GetAccountsFromUserName() 공개 정적인 메소드

Gets all OAuth & OpenID accounts which are associted with the specified user name.
public static GetAccountsFromUserName ( string userName ) : ICollection
userName string The user name.
리턴 ICollection

GetOAuthClientData() 공개 정적인 메소드

Gets the OAuth client data of the specified provider name.
public static GetOAuthClientData ( string providerName ) : Microsoft.Web.WebPages.OAuth.AuthenticationClientData
providerName string Name of the provider.
리턴 Microsoft.Web.WebPages.OAuth.AuthenticationClientData

GetUserName() 공개 정적인 메소드

Gets the registered user name corresponding to the specified provider and provider user id.
public static GetUserName ( string providerName, string providerUserId ) : string
providerName string Name of the provider.
providerUserId string The provider user id.
리턴 string

HasLocalAccount() 공개 정적인 메소드

Determines whether there exists a local account (as opposed to OAuth account) with the specified userId.
public static HasLocalAccount ( System.Guid userId ) : bool
userId System.Guid The user id to check for local account.
리턴 bool

RegisterFacebookClient() 공개 정적인 메소드

Registers the Facebook client.
public static RegisterFacebookClient ( string appId, string appSecret ) : void
appId string The app id.
appSecret string The app secret.
리턴 void

RegisterFacebookClient() 공개 정적인 메소드

Registers the Facebook client.
public static RegisterFacebookClient ( string appId, string appSecret, string displayName ) : void
appId string The app id.
appSecret string The app secret.
displayName string The display name of the client.
리턴 void

RegisterFacebookClient() 공개 정적인 메소드

Registers the Facebook client.
public static RegisterFacebookClient ( string appId, string appSecret, string displayName, object>.IDictionary extraData ) : void
appId string The app id.
appSecret string The app secret.
displayName string The display name.
extraData object>.IDictionary The data bag used to store extra data about this client
리턴 void

RegisterGoogleClient() 공개 정적인 메소드

Registers the Google client.
public static RegisterGoogleClient ( ) : void
리턴 void

RegisterGoogleClient() 공개 정적인 메소드

Registers the Google client.
public static RegisterGoogleClient ( string displayName ) : void
displayName string The display name.
리턴 void

RegisterGoogleClient() 공개 정적인 메소드

Registers the Google client.
public static RegisterGoogleClient ( string displayName, object>.IDictionary extraData ) : void
displayName string The display name.
extraData object>.IDictionary The data bag.
리턴 void

RegisterLinkedInClient() 공개 정적인 메소드

Registers the LinkedIn client.
public static RegisterLinkedInClient ( string consumerKey, string consumerSecret ) : void
consumerKey string The consumer key.
consumerSecret string The consumer secret.
리턴 void

RegisterLinkedInClient() 공개 정적인 메소드

Registers the LinkedIn client.
public static RegisterLinkedInClient ( string consumerKey, string consumerSecret, string displayName ) : void
consumerKey string The consumer key.
consumerSecret string The consumer secret.
displayName string The display name.
리턴 void

RegisterLinkedInClient() 공개 정적인 메소드

Registers the LinkedIn client.
public static RegisterLinkedInClient ( string consumerKey, string consumerSecret, string displayName, object>.IDictionary extraData ) : void
consumerKey string The consumer key.
consumerSecret string The consumer secret.
displayName string The display name.
extraData object>.IDictionary The data bag used to store extra data about this client
리턴 void

RegisterMicrosoftClient() 공개 정적인 메소드

Registers the Microsoft account client.
public static RegisterMicrosoftClient ( string clientId, string clientSecret ) : void
clientId string The client id.
clientSecret string The client secret.
리턴 void

RegisterMicrosoftClient() 공개 정적인 메소드

Registers the Microsoft account client.
public static RegisterMicrosoftClient ( string clientId, string clientSecret, string displayName ) : void
clientId string The client id.
clientSecret string The client secret.
displayName string The display name.
리턴 void

RegisterMicrosoftClient() 공개 정적인 메소드

Registers the Microsoft account client.
public static RegisterMicrosoftClient ( string clientId, string clientSecret, string displayName, object>.IDictionary extraData ) : void
clientId string The client id.
clientSecret string The client secret.
displayName string The display name.
extraData object>.IDictionary The data bag used to store extra data about this client
리턴 void

RegisterTwitterClient() 공개 정적인 메소드

Registers the Twitter client.
public static RegisterTwitterClient ( string consumerKey, string consumerSecret ) : void
consumerKey string The consumer key.
consumerSecret string The consumer secret.
리턴 void

RegisterTwitterClient() 공개 정적인 메소드

Registers the Twitter client.
public static RegisterTwitterClient ( string consumerKey, string consumerSecret, string displayName ) : void
consumerKey string The consumer key.
consumerSecret string The consumer secret.
displayName string The display name.
리턴 void

RegisterTwitterClient() 공개 정적인 메소드

Registers the Twitter client.
public static RegisterTwitterClient ( string consumerKey, string consumerSecret, string displayName, object>.IDictionary extraData ) : void
consumerKey string The consumer key.
consumerSecret string The consumer secret.
displayName string The display name.
extraData object>.IDictionary The data bag used to store extra data about this client
리턴 void

RegisterYahooClient() 공개 정적인 메소드

Registers the Yahoo client.
public static RegisterYahooClient ( ) : void
리턴 void

RegisterYahooClient() 공개 정적인 메소드

Registers the Yahoo client.
public static RegisterYahooClient ( string displayName ) : void
displayName string The display name.
리턴 void

RegisterYahooClient() 공개 정적인 메소드

Registers the Yahoo client.
public static RegisterYahooClient ( string displayName, object>.IDictionary extraData ) : void
displayName string The display name.
extraData object>.IDictionary The data bag.
리턴 void

RequestAuthentication() 공개 정적인 메소드

Requests the specified provider to start the authentication by directing users to an external website
public static RequestAuthentication ( string provider ) : void
provider string The provider.
리턴 void

SerializeProviderUserId() 공개 정적인 메소드

Securely serializes a providerName/providerUserId pair.
Do not persist the return value to permanent storage. This implementation is subject to change.
public static SerializeProviderUserId ( string providerName, string providerUserId ) : string
providerName string The provider name.
providerUserId string The provider-specific user id.
리턴 string

TryGetOAuthClientData() 공개 정적인 메소드

Tries getting the OAuth client data of the specified provider name.
public static TryGetOAuthClientData ( string providerName, AuthenticationClientData &clientData ) : bool
providerName string Name of the provider.
clientData AuthenticationClientData The client data of the specified provider name.
리턴 bool