UserAuthExtensions
Assembly: ServiceStack.dll
View Source
Declaration
public static class UserAuthExtensions
Methods
PopulateMissing(IUserAuthDetails, IAuthTokens, Boolean)
View Source
Declaration
public static void PopulateMissing(this IUserAuthDetails instance, IAuthTokens tokens, bool overwriteReserved = false)
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IUserAuthDetails | instance |
ServiceStack.Auth.IAuthTokens | tokens |
System.Boolean | overwriteReserved |
PopulateMissingExtended(IUserAuthDetailsExtended, IUserAuthDetailsExtended, Boolean)
View Source
Declaration
public static void PopulateMissingExtended(this IUserAuthDetailsExtended instance, IUserAuthDetailsExtended other, bool overwriteReserved = false)
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IUserAuthDetailsExtended | instance |
ServiceStack.Auth.IUserAuthDetailsExtended | other |
System.Boolean | overwriteReserved |
Get<T>(IMeta)
View Source
Declaration
public static T Get<T>(this IMeta instance)
Returns
<T>
Parameters
Type | Name |
---|---|
ServiceStack.IMeta | instance |
Type Parameters
T
TryGet<T>(IMeta, out T)
View Source
Declaration
public static bool TryGet<T>(this IMeta instance, out T value)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.IMeta | instance |
<T> | value |
Type Parameters
T
Set<T>(IMeta, T)
View Source
Declaration
public static T Set<T>(this IMeta instance, T value)
Returns
<T>
Parameters
Type | Name |
---|---|
ServiceStack.IMeta | instance |
<T> | value |
Type Parameters
T
ToAuthTokens(IAuthTokens)
View Source
Declaration
public static AuthTokens ToAuthTokens(this IAuthTokens from)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IAuthTokens | from |
RecordSuccessfulLogin(IUserAuthRepository, IUserAuth)
View Source
Declaration
public static void RecordSuccessfulLogin(this IUserAuthRepository repo, IUserAuth userAuth)
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IUserAuthRepository | repo |
ServiceStack.Auth.IUserAuth | userAuth |
RecordSuccessfulLoginAsync(IUserAuthRepositoryAsync, IUserAuth, CancellationToken)
View Source
Declaration
public static async Task RecordSuccessfulLoginAsync(this IUserAuthRepositoryAsync repo, IUserAuth userAuth, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IUserAuthRepositoryAsync | repo |
ServiceStack.Auth.IUserAuth | userAuth |
System.Threading.CancellationToken | token |
RecordSuccessfulLogin(IUserAuthRepository, IUserAuth, Boolean, String)
View Source
Declaration
public static void RecordSuccessfulLogin(this IUserAuthRepository repo, IUserAuth userAuth, bool rehashPassword, string password)
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IUserAuthRepository | repo |
ServiceStack.Auth.IUserAuth | userAuth |
System.Boolean | rehashPassword |
System.String | password |
RecordSuccessfulLoginAsync(IUserAuthRepositoryAsync, IUserAuth, Boolean, String, CancellationToken)
View Source
Declaration
public static async Task RecordSuccessfulLoginAsync(this IUserAuthRepositoryAsync repo, IUserAuth userAuth, bool rehashPassword, string password, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IUserAuthRepositoryAsync | repo |
ServiceStack.Auth.IUserAuth | userAuth |
System.Boolean | rehashPassword |
System.String | password |
System.Threading.CancellationToken | token |
RecordInvalidLoginAttempt(IUserAuthRepository, IUserAuth)
View Source
Declaration
public static void RecordInvalidLoginAttempt(this IUserAuthRepository repo, IUserAuth userAuth)
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IUserAuthRepository | repo |
ServiceStack.Auth.IUserAuth | userAuth |
RecordInvalidLoginAttemptAsync(IUserAuthRepositoryAsync, IUserAuth, CancellationToken)
View Source
Declaration
public static async Task RecordInvalidLoginAttemptAsync(this IUserAuthRepositoryAsync repo, IUserAuth userAuth, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IUserAuthRepositoryAsync | repo |
ServiceStack.Auth.IUserAuth | userAuth |
System.Threading.CancellationToken | token |
PopulateFromSession(IAuthSession, IAuthSession)
View Source
Declaration
public static void PopulateFromSession(this IAuthSession session, IAuthSession from)
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IAuthSession | session |
ServiceStack.Auth.IAuthSession | from |
PopulateFromMap(IAuthSession, IDictionary<String, String>)
View Source
Declaration
public static void PopulateFromMap(this IAuthSession session, IDictionary<string, string> map)
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IAuthSession | session |
System.Collections.Generic.IDictionary<System.String,System.String> | map |
ConvertSessionToClaims(IAuthSession, String, String, String)
View Source
Declaration
public static List<Claim> ConvertSessionToClaims(this IAuthSession session, string issuer = null, string roleClaimType = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role", string permissionClaimType = "perm")
Returns
System.Collections.Generic.List<System.Security.Claims.Claim>
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IAuthSession | session |
System.String | issuer |
System.String | roleClaimType |
System.String | permissionClaimType |