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
Type | Name |
---|---|
ServiceStack.Auth.IAuthProvider | authProvider |
ServiceStack.Auth.IAuthSession | session |
ServiceStack.Auth.IAuthTokens | tokens |
SanitizeOAuthUrl(String)
View Source
Declaration
public static string SanitizeOAuthUrl(this string url)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | url |
PopulateRequestDtoIfAuthenticated(IRequest, Object)
View Source
Declaration
public static bool PopulateRequestDtoIfAuthenticated(this IRequest req, object requestDto)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
System.Object | requestDto |
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
Type | Name |
---|---|
ServiceStack.Auth.IAuthProvider | provider |
ServiceStack.IServiceBase | authService |
ServiceStack.Auth.IAuthSession | session |
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
Type | Name |
---|---|
ServiceStack.Auth.IAuthProvider | provider |
ServiceStack.IServiceBase | authService |
ServiceStack.Auth.IAuthSession | session |
System.Nullable<System.TimeSpan> | sessionExpiry |
System.Threading.CancellationToken | token |
GetHashAndSaltString(String, out String, out String)
View Source
Declaration
public static void GetHashAndSaltString(string password, out string hash, out string salt)
Parameters
Type | Name |
---|---|
System.String | password |
System.String | hash |
System.String | salt |
PopulatePasswordHashes(IUserAuth, String, IUserAuth)
View Source
Declaration
public static void PopulatePasswordHashes(this IUserAuth newUser, string password, IUserAuth existingUser = null)
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IUserAuth | newUser |
System.String | password |
ServiceStack.Auth.IUserAuth | existingUser |
VerifyPassword(IUserAuth, String, out Boolean)
View Source
Declaration
public static bool VerifyPassword(this IUserAuth userAuth, string providedPassword, out bool needsRehash)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IUserAuth | userAuth |
System.String | providedPassword |
System.Boolean | needsRehash |
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
Type | Name |
---|---|
ServiceStack.Auth.IUserAuth | userAuth |
System.Collections.Generic.Dictionary<System.String,System.String> | digestHeaders |
System.String | privateKey |
System.Int32 | nonceTimeOut |
System.String | sequence |