C# Класс ServiceStack.Authentication.Aad.AadAuthProvider

Azure Active Directory (AAD) Auth Provider
You must provide the `ClientId` and `ClientSecret`. They can be provided to the constructor, by setting the properties, or in the app.config appsettings under the following keys: `oauth.aad.ClientId` and `oauth.aad.ClientSecret` You may also provide the `TenantId` of your AAD resource. The Tenant ID can be found in the oauth2 endpoint as shown: https://login.microsoftonline.com/{TenantId}/oauth2/token If no Tenant ID is provided the `common` tenant will be used. The `CallbackUrl` will default to the /auth/aad path, but it can be configured explicitly. In either case it must match what has been configured on Azure as a "REPLY URL". The following properties are not used. If any are configured a warning will be logged. This can be disabled with `LogConfigurationWarnings`. - `RedirectUrl` - `RequestTokenUrl`
Наследование: ServiceStack.Auth.OAuthProvider
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Realm string

Открытые методы

Метод Описание
AadAuthProvider ( IAppSettings appSettings ) : ServiceStack.Auth
AadAuthProvider ( string clientId, string clientSecret ) : ServiceStack.Auth
AadAuthProvider ( string clientId, string clientSecret, IAppSettings appSettings ) : ServiceStack.Auth
Authenticate ( IServiceBase authService, IAuthSession session, Authenticate request ) : object
LoadUserOAuthProvider ( IAuthSession authSession, IAuthTokens tokens ) : void
Logout ( IServiceBase service, Authenticate request ) : object
OnAuthenticated ( IServiceBase authService, IAuthSession session, IAuthTokens tokens, string>.Dictionary authInfo ) : IHttpResult
RedirectToMicrosoftLogout ( IServiceBase authService ) : IHttpResult

Returns a redirect result to a Microsoft logout page

Защищенные методы

Метод Описание
GetReferrerUrl ( IServiceBase authService, IAuthSession session, Authenticate request = null ) : string
LoadUserAuthInfo ( ServiceStack.Auth.AuthUserSession userSession, IAuthTokens tokens, string>.Dictionary authInfo ) : void
RedirectDueToFailure ( IServiceBase authService, IAuthSession session, NameValueCollection errorInfo ) : IHttpResult

Приватные методы

Метод Описание
AadAuthProvider ( ) : ServiceStack.Auth
FailAndLogError ( IAuthSession session, NameValueCollection errorInfo ) : void
HasError ( NameValueCollection info ) : bool
RequestAccessToken ( IServiceBase authService, IAuthSession session, string code, IAuthTokens tokens ) : IHttpResult
RequestCode ( IServiceBase authService, IAuthSession session, ServiceStack.Auth.AuthUserSession userSession, IAuthTokens tokens ) : object

Описание методов

AadAuthProvider() публичный Метод

public AadAuthProvider ( IAppSettings appSettings ) : ServiceStack.Auth
appSettings IAppSettings
Результат ServiceStack.Auth

AadAuthProvider() публичный Метод

public AadAuthProvider ( string clientId, string clientSecret ) : ServiceStack.Auth
clientId string
clientSecret string
Результат ServiceStack.Auth

AadAuthProvider() публичный Метод

public AadAuthProvider ( string clientId, string clientSecret, IAppSettings appSettings ) : ServiceStack.Auth
clientId string
clientSecret string
appSettings IAppSettings
Результат ServiceStack.Auth

Authenticate() публичный Метод

public Authenticate ( IServiceBase authService, IAuthSession session, Authenticate request ) : object
authService IServiceBase
session IAuthSession
request Authenticate
Результат object

GetReferrerUrl() защищенный Метод

protected GetReferrerUrl ( IServiceBase authService, IAuthSession session, Authenticate request = null ) : string
authService IServiceBase
session IAuthSession
request Authenticate
Результат string

LoadUserAuthInfo() защищенный Метод

protected LoadUserAuthInfo ( ServiceStack.Auth.AuthUserSession userSession, IAuthTokens tokens, string>.Dictionary authInfo ) : void
userSession ServiceStack.Auth.AuthUserSession
tokens IAuthTokens
authInfo string>.Dictionary
Результат void

LoadUserOAuthProvider() публичный Метод

public LoadUserOAuthProvider ( IAuthSession authSession, IAuthTokens tokens ) : void
authSession IAuthSession
tokens IAuthTokens
Результат void

Logout() публичный Метод

public Logout ( IServiceBase service, Authenticate request ) : object
service IServiceBase
request Authenticate
Результат object

OnAuthenticated() публичный Метод

public OnAuthenticated ( IServiceBase authService, IAuthSession session, IAuthTokens tokens, string>.Dictionary authInfo ) : IHttpResult
authService IServiceBase
session IAuthSession
tokens IAuthTokens
authInfo string>.Dictionary
Результат IHttpResult

RedirectDueToFailure() защищенный Метод

protected RedirectDueToFailure ( IServiceBase authService, IAuthSession session, NameValueCollection errorInfo ) : IHttpResult
authService IServiceBase
session IAuthSession
errorInfo System.Collections.Specialized.NameValueCollection
Результат IHttpResult

RedirectToMicrosoftLogout() публичный Метод

Returns a redirect result to a Microsoft logout page
public RedirectToMicrosoftLogout ( IServiceBase authService ) : IHttpResult
authService IServiceBase
Результат IHttpResult

Описание свойств

Realm публичное статическое свойство

public static string Realm
Результат string