Skip to main content

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
TypeName
ServiceStack.Auth.IUserAuthDetailsinstance
ServiceStack.Auth.IAuthTokenstokens
System.BooleanoverwriteReserved

PopulateMissingExtended(IUserAuthDetailsExtended, IUserAuthDetailsExtended, Boolean)

View Source
Declaration
public static void PopulateMissingExtended(this IUserAuthDetailsExtended instance, IUserAuthDetailsExtended other, bool overwriteReserved = false)
Parameters
TypeName
ServiceStack.Auth.IUserAuthDetailsExtendedinstance
ServiceStack.Auth.IUserAuthDetailsExtendedother
System.BooleanoverwriteReserved

Get<T>(IMeta)

View Source
Declaration
public static T Get<T>(this IMeta instance)
Returns

<T>

Parameters
TypeName
ServiceStack.IMetainstance
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
TypeName
ServiceStack.IMetainstance
<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
TypeName
ServiceStack.IMetainstance
<T>value
Type Parameters
  • T

ToAuthTokens(IAuthTokens)

View Source
Declaration
public static AuthTokens ToAuthTokens(this IAuthTokens from)
Returns

ServiceStack.Auth.AuthTokens

Parameters
TypeName
ServiceStack.Auth.IAuthTokensfrom

RecordSuccessfulLogin(IUserAuthRepository, IUserAuth)

View Source
Declaration
public static void RecordSuccessfulLogin(this IUserAuthRepository repo, IUserAuth userAuth)
Parameters
TypeName
ServiceStack.Auth.IUserAuthRepositoryrepo
ServiceStack.Auth.IUserAuthuserAuth

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
TypeName
ServiceStack.Auth.IUserAuthRepositoryAsyncrepo
ServiceStack.Auth.IUserAuthuserAuth
System.Threading.CancellationTokentoken

RecordSuccessfulLogin(IUserAuthRepository, IUserAuth, Boolean, String)

View Source
Declaration
public static void RecordSuccessfulLogin(this IUserAuthRepository repo, IUserAuth userAuth, bool rehashPassword, string password)
Parameters
TypeName
ServiceStack.Auth.IUserAuthRepositoryrepo
ServiceStack.Auth.IUserAuthuserAuth
System.BooleanrehashPassword
System.Stringpassword

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
TypeName
ServiceStack.Auth.IUserAuthRepositoryAsyncrepo
ServiceStack.Auth.IUserAuthuserAuth
System.BooleanrehashPassword
System.Stringpassword
System.Threading.CancellationTokentoken

RecordInvalidLoginAttempt(IUserAuthRepository, IUserAuth)

View Source
Declaration
public static void RecordInvalidLoginAttempt(this IUserAuthRepository repo, IUserAuth userAuth)
Parameters
TypeName
ServiceStack.Auth.IUserAuthRepositoryrepo
ServiceStack.Auth.IUserAuthuserAuth

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
TypeName
ServiceStack.Auth.IUserAuthRepositoryAsyncrepo
ServiceStack.Auth.IUserAuthuserAuth
System.Threading.CancellationTokentoken

PopulateFromSession(IAuthSession, IAuthSession)

View Source
Declaration
public static void PopulateFromSession(this IAuthSession session, IAuthSession from)
Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthSessionfrom

PopulateFromMap(IAuthSession, IDictionary<String, String>)

View Source
Declaration
public static void PopulateFromMap(this IAuthSession session, IDictionary<string, string> map)
Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
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
TypeName
ServiceStack.Auth.IAuthSessionsession
System.Stringissuer
System.StringroleClaimType
System.StringpermissionClaimType