Skip to main content

CredentialsAuthProviderSync

Assembly: ServiceStack.dll
View Source
Declaration
public class CredentialsAuthProviderSync : AuthProviderSync, IAuthProvider, IAuthPlugin

Properties

Type

View Source
Declaration
public override string Type { get; }

SkipPasswordVerificationForInProcessRequests

View Source
Declaration
public bool SkipPasswordVerificationForInProcessRequests { get; set; }

Inherited Properties

AccountLockedValidator

View Source
Declaration
public Func<IAuthRepository, IUserAuth, IAuthTokens, bool> AccountLockedValidator { get; set; }

AuthEvents

View Source
Declaration
public IAuthEvents AuthEvents { get; }

AuthRealm

View Source
Declaration
public string AuthRealm { get; set; }

CallbackUrl

View Source
Declaration
public string CallbackUrl { get; set; }

CustomValidationFilter

View Source
Declaration
public Func<AuthContext, IHttpResult> CustomValidationFilter { get; set; }

ExcludeAuthInfoItems

View Source
Declaration
public HashSet<string> ExcludeAuthInfoItems { get; set; }

LoadUserAuthFilter

View Source
Declaration
public Action<AuthUserSession, IAuthTokens, Dictionary<string, string>> LoadUserAuthFilter { get; set; }

Meta

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

NavItem

View Source
Declaration
public NavItem NavItem { get; set; }

PersistSession

View Source
Declaration
public bool PersistSession { get; set; }

Provider

View Source
Declaration
public string Provider { get; set; }

RedirectUrl

View Source
Declaration
public string RedirectUrl { get; set; }

RestoreSessionFromState

View Source
Declaration
public bool? RestoreSessionFromState { get; set; }

SaveExtendedUserInfo

View Source
Declaration
public bool SaveExtendedUserInfo { get; set; }

SessionExpiry

View Source
Declaration
public TimeSpan? SessionExpiry { get; set; }

Type

View Source
Declaration
public virtual string Type { get; }

Fields

Name

View Source
Declaration
public static string Name

Realm

View Source
Declaration
public static string Realm

Methods

GetUserAuthRepository(IRequest)

View Source
Declaration
public IUserAuthRepository GetUserAuthRepository(IRequest request)
Returns

ServiceStack.Auth.IUserAuthRepository

Parameters
TypeName
ServiceStack.Web.IRequestrequest

TryAuthenticate(IServiceBase, String, String)

View Source
Declaration
public virtual bool TryAuthenticate(IServiceBase authService, string userName, string password)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.IServiceBaseauthService
System.StringuserName
System.Stringpassword

IsAuthorized(IAuthSession, IAuthTokens, Authenticate)

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

System.Boolean

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

Authenticate(IServiceBase, IAuthSession, Authenticate)

View Source
Declaration
public override object Authenticate(IServiceBase authService, IAuthSession session, Authenticate request)
Returns

System.Object

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Authenticaterequest

Authenticate(IServiceBase, IAuthSession, String, String)

View Source
Declaration
protected object Authenticate(IServiceBase authService, IAuthSession session, string userName, string password)
Returns

System.Object

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
System.StringuserName
System.Stringpassword

ResetSessionBeforeLogin(IServiceBase, IAuthSession, String)

View Source
Declaration
protected virtual IAuthSession ResetSessionBeforeLogin(IServiceBase authService, IAuthSession session, string userName)
Returns

ServiceStack.Auth.IAuthSession

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
System.StringuserName

Authenticate(IServiceBase, IAuthSession, String, String, String)

View Source
Declaration
protected object Authenticate(IServiceBase authService, IAuthSession session, string userName, string password, string referrerUrl)
Returns

System.Object

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
System.StringuserName
System.Stringpassword
System.StringreferrerUrl

AuthenticatePrivateRequest(IServiceBase, IAuthSession, String, String, String)

View Source
Declaration
protected virtual object AuthenticatePrivateRequest(IServiceBase authService, IAuthSession session, string userName, string password, string referrerUrl)
Returns

System.Object

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
System.StringuserName
System.Stringpassword
System.StringreferrerUrl

OnAuthenticated(IServiceBase, IAuthSession, IAuthTokens, Dictionary<String, String>)

View Source
Declaration
public override IHttpResult OnAuthenticated(IServiceBase authService, IAuthSession session, IAuthTokens tokens, Dictionary<string, string> authInfo)
Returns

ServiceStack.Web.IHttpResult

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens
System.Collections.Generic.Dictionary<System.String,System.String>authInfo

Inherited Methods

Authenticate(IServiceBase, IAuthSession, Authenticate)

View Source
Declaration
public abstract object Authenticate(IServiceBase authService, IAuthSession session, Authenticate request)
Returns

System.Object

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Authenticaterequest

AuthenticateAsync(IServiceBase, IAuthSession, Authenticate, CancellationToken)

View Source
Declaration
public 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

ConvertToClientError(Object, Boolean)

View Source
Declaration
protected virtual object ConvertToClientError(object failedResult, bool isHtml)
Returns

System.Object

Parameters
TypeName
System.ObjectfailedResult
System.BooleanisHtml

CreateOrMergeAuthSession(IAuthSession, IAuthTokens)

View Source
Declaration
public virtual string CreateOrMergeAuthSession(IAuthSession session, IAuthTokens tokens)
Returns

System.String

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

EmailAlreadyExists(IAuthRepository, IUserAuth, IAuthTokens)

View Source
Declaration
protected virtual bool EmailAlreadyExists(IAuthRepository authRepo, IUserAuth userAuth, IAuthTokens tokens = null)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Auth.IAuthRepositoryauthRepo
ServiceStack.Auth.IUserAuthuserAuth
ServiceStack.Auth.IAuthTokenstokens

FallbackConfig(String)

Allows specifying a global fallback config that if exists is formatted with the Provider as the first arg. E.g. this appSetting with the TwitterAuthProvider: oauth.CallbackUrl="http://localhost:11001/auth/{0}" Would result in: oauth.CallbackUrl="http://localhost:11001/auth/twitter"

View Source
Declaration
protected string FallbackConfig(string fallback)
Returns

System.String

Parameters
TypeName
System.Stringfallback

GetAuthRedirectUrl(IServiceBase, IAuthSession)

View Source
Declaration
protected virtual string GetAuthRedirectUrl(IServiceBase authService, IAuthSession session)
Returns

System.String

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession

GetAuthRepository(IRequest)

View Source
Declaration
protected virtual IAuthRepository GetAuthRepository(IRequest req)
Returns

ServiceStack.Auth.IAuthRepository

Parameters
TypeName
ServiceStack.Web.IRequestreq

GetReferrerUrl(IServiceBase, IAuthSession, Authenticate)

View Source
Declaration
protected virtual string GetReferrerUrl(IServiceBase authService, IAuthSession session, Authenticate request = null)
Returns

System.String

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Authenticaterequest

IsAccountLocked(IAuthRepository, IUserAuth, IAuthTokens)

View Source
Declaration
public virtual bool IsAccountLocked(IAuthRepository authRepo, IUserAuth userAuth, IAuthTokens tokens = null)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Auth.IAuthRepositoryauthRepo
ServiceStack.Auth.IUserAuthuserAuth
ServiceStack.Auth.IAuthTokenstokens

IsAuthorized(IAuthSession, IAuthTokens, Authenticate)

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

System.Boolean

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

LoadUserAuthInfo(AuthUserSession, IAuthTokens, Dictionary<String, String>)

View Source
Declaration
protected virtual void LoadUserAuthInfo(AuthUserSession userSession, IAuthTokens tokens, Dictionary<string, string> authInfo)
Parameters
TypeName
ServiceStack.AuthUserSessionuserSession
ServiceStack.Auth.IAuthTokenstokens
System.Collections.Generic.Dictionary<System.String,System.String>authInfo

LoginMatchesSession(IAuthSession, String)

View Source
Declaration
protected static bool LoginMatchesSession(IAuthSession session, string userName)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
System.StringuserName

Logout(IServiceBase, Authenticate)

Remove the Users Session

View Source
Declaration
public virtual object Logout(IServiceBase service, Authenticate request)
Returns

System.Object

Parameters
TypeName
ServiceStack.IServiceBaseservice
ServiceStack.Authenticaterequest

LogoutAsync(IServiceBase, Authenticate, CancellationToken)

View Source
Declaration
public 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

OnAuthenticated(IServiceBase, IAuthSession, IAuthTokens, Dictionary<String, String>)

View Source
Declaration
public virtual IHttpResult OnAuthenticated(IServiceBase authService, IAuthSession session, IAuthTokens tokens, Dictionary<string, string> authInfo)
Returns

ServiceStack.Web.IHttpResult

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens
System.Collections.Generic.Dictionary<System.String,System.String>authInfo

OnFailedAuthentication(IAuthSession, IRequest, IResponse)

View Source
Declaration
public virtual Task OnFailedAuthentication(IAuthSession session, IRequest httpReq, IResponse httpRes)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Web.IRequesthttpReq
ServiceStack.Web.IResponsehttpRes

Register(IAppHost, AuthFeature)

View Source
Declaration
public virtual void Register(IAppHost appHost, AuthFeature feature)
Parameters
TypeName
ServiceStack.IAppHostappHost
ServiceStack.AuthFeaturefeature

UrlFilter(AuthProviderSync, String)

View Source
Declaration
public static string UrlFilter(AuthProviderSync provider, string url)
Returns

System.String

Parameters
TypeName
ServiceStack.Auth.AuthProviderSyncprovider
System.Stringurl

UserNameAlreadyExists(IAuthRepository, IUserAuth, IAuthTokens)

View Source
Declaration
protected virtual bool UserNameAlreadyExists(IAuthRepository authRepo, IUserAuth userAuth, IAuthTokens tokens = null)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Auth.IAuthRepositoryauthRepo
ServiceStack.Auth.IUserAuthuserAuth
ServiceStack.Auth.IAuthTokenstokens

ValidateAccount(IServiceBase, IAuthRepository, IAuthSession, IAuthTokens)

View Source
Declaration
protected virtual IHttpResult ValidateAccount(IServiceBase authService, IAuthRepository authRepo, IAuthSession session, IAuthTokens tokens)
Returns

ServiceStack.Web.IHttpResult

Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthRepositoryauthRepo
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens

Implements