Skip to main content

IAuthProvider

Assembly: ServiceStack.dll
View Source
Declaration
public interface IAuthProvider

Properties

Type

View Source
Declaration
string Type { get; }

Meta

View Source
Declaration
Dictionary<string, string> Meta { get; }

AuthRealm

View Source
Declaration
string AuthRealm { get; set; }

Provider

View Source
Declaration
string Provider { get; set; }

CallbackUrl

View Source
Declaration
string CallbackUrl { get; set; }

Methods

LogoutAsync(IServiceBase, Authenticate, CancellationToken)

Remove the Users Session

View Source
Declaration
Task<object> LogoutAsync(IServiceBase service, Authenticate request, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
ServiceStack.IServiceBaseservice
ServiceStack.Authenticaterequest
System.Threading.CancellationTokentoken

AuthenticateAsync(IServiceBase, IAuthSession, Authenticate, CancellationToken)

The entry point for all AuthProvider providers. Runs inside the AuthService so exceptions are treated normally. Overridable so you can provide your own Auth implementation.

View Source
Declaration
Task<object> AuthenticateAsync(IServiceBase authService, IAuthSession session, Authenticate request, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Authenticaterequest
System.Threading.CancellationTokentoken

IsAuthorized(IAuthSession, IAuthTokens, Authenticate)

Determine if the current session is already authenticated with this AuthProvider

View Source
Declaration
bool IsAuthorized(IAuthSession session, IAuthTokens tokens, Authenticate request = null)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens
ServiceStack.Authenticaterequest