Skip to main content

AuthProviderExtensions

Assembly: ServiceStack.dll​
View Source​
Declaration
public static class AuthProviderExtensions

Methods​

IsAuthorizedSafe(IAuthProvider, IAuthSession, IAuthTokens)​

View Source​
Declaration
public static bool IsAuthorizedSafe(this IAuthProvider authProvider, IAuthSession session, IAuthTokens tokens)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.Auth.IAuthProviderauthProvider
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens

SanitizeOAuthUrl(String)​

View Source​
Declaration
public static string SanitizeOAuthUrl(this string url)
Returns​

System.String

Parameters​
TypeName
System.Stringurl

PopulateRequestDtoIfAuthenticated(IRequest, Object)​

View Source​
Declaration
public static bool PopulateRequestDtoIfAuthenticated(this IRequest req, object requestDto)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.Web.IRequestreq
System.ObjectrequestDto

SaveSession(IAuthProvider, IServiceBase, IAuthSession, Nullable<TimeSpan>)​

View Source​
Declaration
[Obsolete("Use SaveSessionAsync")]
public static void SaveSession(this IAuthProvider provider, IServiceBase authService, IAuthSession session, TimeSpan? sessionExpiry = null)
Parameters​
TypeName
ServiceStack.Auth.IAuthProviderprovider
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
System.Nullable<System.TimeSpan>sessionExpiry

SaveSessionAsync(IAuthProvider, IServiceBase, IAuthSession, Nullable<TimeSpan>, CancellationToken)​

View Source​
Declaration
public static async Task SaveSessionAsync(this IAuthProvider provider, IServiceBase authService, IAuthSession session, TimeSpan? sessionExpiry = null, CancellationToken token = default(CancellationToken))
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
ServiceStack.Auth.IAuthProviderprovider
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
System.Nullable<System.TimeSpan>sessionExpiry
System.Threading.CancellationTokentoken

GetHashAndSaltString(String, out String, out String)​

View Source​
Declaration
public static void GetHashAndSaltString(string password, out string hash, out string salt)
Parameters​
TypeName
System.Stringpassword
System.Stringhash
System.Stringsalt

PopulatePasswordHashes(IUserAuth, String, IUserAuth)​

View Source​
Declaration
public static void PopulatePasswordHashes(this IUserAuth newUser, string password, IUserAuth existingUser = null)
Parameters​
TypeName
ServiceStack.Auth.IUserAuthnewUser
System.Stringpassword
ServiceStack.Auth.IUserAuthexistingUser

VerifyPassword(IUserAuth, String, out Boolean)​

View Source​
Declaration
public static bool VerifyPassword(this IUserAuth userAuth, string providedPassword, out bool needsRehash)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.Auth.IUserAuthuserAuth
System.StringprovidedPassword
System.BooleanneedsRehash

VerifyDigestAuth(IUserAuth, Dictionary<String, String>, String, Int32, String)​

View Source​
Declaration
public static bool VerifyDigestAuth(this IUserAuth userAuth, Dictionary<string, string> digestHeaders, string privateKey, int nonceTimeOut, string sequence)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.Auth.IUserAuthuserAuth
System.Collections.Generic.Dictionary<System.String,System.String>digestHeaders
System.StringprivateKey
System.Int32nonceTimeOut
System.Stringsequence