Skip to main content

RedisAuthRepository<TUserAuth, TUserAuthDetails>

Assembly: ServiceStack.dll
View Source
Declaration
public class RedisAuthRepository<TUserAuth, TUserAuthDetails> : IUserAuthRepository, IAuthRepository, IClearable, IManageApiKeys, ICustomUserAuth, IQueryUserAuth, IUserAuthRepositoryAsync, IAuthRepositoryAsync, IClearableAsync, IManageApiKeysAsync, IQueryUserAuthAsync where TUserAuth : class, IUserAuth where TUserAuthDetails : class, IUserAuthDetails

Properties

NamespacePrefix

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

Methods

CreateUserAuth(IUserAuth, String)

View Source
Declaration
public virtual IUserAuth CreateUserAuth(IUserAuth newUser, string password)
Returns

ServiceStack.Auth.IUserAuth

Parameters
TypeName
ServiceStack.Auth.IUserAuthnewUser
System.Stringpassword

UpdateUserAuth(IUserAuth, IUserAuth, String)

View Source
Declaration
public virtual IUserAuth UpdateUserAuth(IUserAuth existingUser, IUserAuth newUser, string password)
Returns

ServiceStack.Auth.IUserAuth

Parameters
TypeName
ServiceStack.Auth.IUserAuthexistingUser
ServiceStack.Auth.IUserAuthnewUser
System.Stringpassword

UpdateUserAuth(IUserAuth, IUserAuth)

View Source
Declaration
public virtual IUserAuth UpdateUserAuth(IUserAuth existingUser, IUserAuth newUser)
Returns

ServiceStack.Auth.IUserAuth

Parameters
TypeName
ServiceStack.Auth.IUserAuthexistingUser
ServiceStack.Auth.IUserAuthnewUser

GetUserAuthByUserName(String)

View Source
Declaration
public virtual IUserAuth GetUserAuthByUserName(string userNameOrEmail)
Returns

ServiceStack.Auth.IUserAuth

Parameters
TypeName
System.StringuserNameOrEmail

TryAuthenticate(String, String, out IUserAuth)

View Source
Declaration
public virtual bool TryAuthenticate(string userName, string password, out IUserAuth userAuth)
Returns

System.Boolean

Parameters
TypeName
System.StringuserName
System.Stringpassword
ServiceStack.Auth.IUserAuthuserAuth

TryAuthenticate(Dictionary<String, String>, String, Int32, String, out IUserAuth)

View Source
Declaration
public bool TryAuthenticate(Dictionary<string, string> digestHeaders, string privateKey, int nonceTimeOut, string sequence, out IUserAuth userAuth)
Returns

System.Boolean

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

LoadUserAuth(IAuthSession, IAuthTokens)

View Source
Declaration
public virtual void LoadUserAuth(IAuthSession session, IAuthTokens tokens)
Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens

DeleteUserAuth(String)

View Source
Declaration
public virtual void DeleteUserAuth(string userAuthId)
Parameters
TypeName
System.StringuserAuthId

GetUserAuth(String)

View Source
Declaration
public virtual IUserAuth GetUserAuth(string userAuthId)
Returns

ServiceStack.Auth.IUserAuth

Parameters
TypeName
System.StringuserAuthId

SaveUserAuth(IAuthSession)

View Source
Declaration
public virtual void SaveUserAuth(IAuthSession authSession)
Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession

SaveUserAuth(IUserAuth)

View Source
Declaration
public void SaveUserAuth(IUserAuth userAuth)
Parameters
TypeName
ServiceStack.Auth.IUserAuthuserAuth

GetUserAuthDetails(String)

View Source
Declaration
public virtual List<IUserAuthDetails> GetUserAuthDetails(string userAuthId)
Returns

System.Collections.Generic.List<ServiceStack.Auth.IUserAuthDetails>

Parameters
TypeName
System.StringuserAuthId

GetUserAuth(IAuthSession, IAuthTokens)

View Source
Declaration
public virtual IUserAuth GetUserAuth(IAuthSession authSession, IAuthTokens tokens)
Returns

ServiceStack.Auth.IUserAuth

Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession
ServiceStack.Auth.IAuthTokenstokens

CreateOrMergeAuthSession(IAuthSession, IAuthTokens)

View Source
Declaration
public virtual IUserAuthDetails CreateOrMergeAuthSession(IAuthSession authSession, IAuthTokens tokens)
Returns

ServiceStack.Auth.IUserAuthDetails

Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession
ServiceStack.Auth.IAuthTokenstokens

InitApiKeySchema()

View Source
Declaration
public virtual void InitApiKeySchema()

ApiKeyExists(String)

View Source
Declaration
public virtual bool ApiKeyExists(string apiKey)
Returns

System.Boolean

Parameters
TypeName
System.StringapiKey

GetApiKey(String)

View Source
Declaration
public virtual ApiKey GetApiKey(string apiKey)
Returns

ServiceStack.Auth.ApiKey

Parameters
TypeName
System.StringapiKey

GetUserApiKeys(String)

View Source
Declaration
public virtual List<ApiKey> GetUserApiKeys(string userId)
Returns

System.Collections.Generic.List<ServiceStack.Auth.ApiKey>

Parameters
TypeName
System.StringuserId

StoreAll(IEnumerable<ApiKey>)

View Source
Declaration
public virtual void StoreAll(IEnumerable<ApiKey> apiKeys)
Parameters
TypeName
System.Collections.Generic.IEnumerable<ServiceStack.Auth.ApiKey>apiKeys

Clear()

View Source
Declaration
public virtual void Clear()

CreateUserAuth()

View Source
Declaration
public IUserAuth CreateUserAuth()
Returns

ServiceStack.Auth.IUserAuth

CreateUserAuthDetails()

View Source
Declaration
public IUserAuthDetails CreateUserAuthDetails()
Returns

ServiceStack.Auth.IUserAuthDetails

GetUserAuths(String, Nullable<Int32>, Nullable<Int32>)

View Source
Declaration
public List<IUserAuth> GetUserAuths(string orderBy = null, int? skip = null, int? take = null)
Returns

System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.StringorderBy
System.Nullable<System.Int32>skip
System.Nullable<System.Int32>take

SearchUserAuths(String, String, Nullable<Int32>, Nullable<Int32>)

View Source
Declaration
public List<IUserAuth> SearchUserAuths(string query, string orderBy = null, int? skip = null, int? take = null)
Returns

System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.Stringquery
System.StringorderBy
System.Nullable<System.Int32>skip
System.Nullable<System.Int32>take

QueryUserAuths(List<IUserAuth>, String, String, Nullable<Int32>, Nullable<Int32>)

View Source
Declaration
public virtual List<IUserAuth> QueryUserAuths(List<IUserAuth> results, string query = null, string orderBy = null, int? skip = null, int? take = null)
Returns

System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>results
System.Stringquery
System.StringorderBy
System.Nullable<System.Int32>skip
System.Nullable<System.Int32>take

CreateUserAuthAsync(IUserAuth, String, CancellationToken)

View Source
Declaration
public virtual async Task<IUserAuth> CreateUserAuthAsync(IUserAuth newUser, string password, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
ServiceStack.Auth.IUserAuthnewUser
System.Stringpassword
System.Threading.CancellationTokentoken

UpdateUserAuthAsync(IUserAuth, IUserAuth, String, CancellationToken)

View Source
Declaration
public virtual async Task<IUserAuth> UpdateUserAuthAsync(IUserAuth existingUser, IUserAuth newUser, string password, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
ServiceStack.Auth.IUserAuthexistingUser
ServiceStack.Auth.IUserAuthnewUser
System.Stringpassword
System.Threading.CancellationTokentoken

UpdateUserAuthAsync(IUserAuth, IUserAuth, CancellationToken)

View Source
Declaration
public virtual async Task<IUserAuth> UpdateUserAuthAsync(IUserAuth existingUser, IUserAuth newUser, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
ServiceStack.Auth.IUserAuthexistingUser
ServiceStack.Auth.IUserAuthnewUser
System.Threading.CancellationTokentoken

GetUserAuthByUserNameAsync(String, CancellationToken)

View Source
Declaration
public virtual async Task<IUserAuth> GetUserAuthByUserNameAsync(string userNameOrEmail, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.StringuserNameOrEmail
System.Threading.CancellationTokentoken

TryAuthenticateAsync(String, String, CancellationToken)

View Source
Declaration
public virtual async Task<IUserAuth> TryAuthenticateAsync(string userName, string password, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.StringuserName
System.Stringpassword
System.Threading.CancellationTokentoken

TryAuthenticateAsync(Dictionary<String, String>, String, Int32, String, CancellationToken)

View Source
Declaration
public async Task<IUserAuth> TryAuthenticateAsync(Dictionary<string, string> digestHeaders, string privateKey, int nonceTimeOut, string sequence, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.Collections.Generic.Dictionary<System.String,System.String>digestHeaders
System.StringprivateKey
System.Int32nonceTimeOut
System.Stringsequence
System.Threading.CancellationTokentoken

LoadUserAuthAsync(IAuthSession, IAuthTokens, CancellationToken)

View Source
Declaration
public virtual async Task LoadUserAuthAsync(IAuthSession session, IAuthTokens tokens, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens
System.Threading.CancellationTokentoken

DeleteUserAuthAsync(String, CancellationToken)

View Source
Declaration
public virtual async Task DeleteUserAuthAsync(string userAuthId, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.StringuserAuthId
System.Threading.CancellationTokentoken

GetUserAuthAsync(String, CancellationToken)

View Source
Declaration
public virtual async Task<IUserAuth> GetUserAuthAsync(string userAuthId, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
System.StringuserAuthId
System.Threading.CancellationTokentoken

SaveUserAuthAsync(IAuthSession, CancellationToken)

View Source
Declaration
public virtual async Task SaveUserAuthAsync(IAuthSession authSession, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession
System.Threading.CancellationTokentoken

SaveUserAuthAsync(IUserAuth, CancellationToken)

View Source
Declaration
public async Task SaveUserAuthAsync(IUserAuth userAuth, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Auth.IUserAuthuserAuth
System.Threading.CancellationTokentoken

GetUserAuthDetailsAsync(String, CancellationToken)

View Source
Declaration
public virtual async Task<List<IUserAuthDetails>> GetUserAuthDetailsAsync(string userAuthId, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuthDetails>>

Parameters
TypeName
System.StringuserAuthId
System.Threading.CancellationTokentoken

GetUserAuthAsync(IAuthSession, IAuthTokens, CancellationToken)

View Source
Declaration
public virtual async Task<IUserAuth> GetUserAuthAsync(IAuthSession authSession, IAuthTokens tokens, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>

Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession
ServiceStack.Auth.IAuthTokenstokens
System.Threading.CancellationTokentoken

CreateOrMergeAuthSessionAsync(IAuthSession, IAuthTokens, CancellationToken)

View Source
Declaration
public virtual async Task<IUserAuthDetails> CreateOrMergeAuthSessionAsync(IAuthSession authSession, IAuthTokens tokens, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuthDetails>

Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession
ServiceStack.Auth.IAuthTokenstokens
System.Threading.CancellationTokentoken

InitApiKeySchemaAsync(CancellationToken)

View Source
Declaration
public virtual Task InitApiKeySchemaAsync(CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Threading.CancellationTokentoken

ApiKeyExistsAsync(String, CancellationToken)

View Source
Declaration
public virtual async Task<bool> ApiKeyExistsAsync(string apiKey, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.StringapiKey
System.Threading.CancellationTokentoken

GetApiKeyAsync(String, CancellationToken)

View Source
Declaration
public virtual async Task<ApiKey> GetApiKeyAsync(string apiKey, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<ServiceStack.Auth.ApiKey>

Parameters
TypeName
System.StringapiKey
System.Threading.CancellationTokentoken

GetUserApiKeysAsync(String, CancellationToken)

View Source
Declaration
public virtual async Task<List<ApiKey>> GetUserApiKeysAsync(string userId, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.ApiKey>>

Parameters
TypeName
System.StringuserId
System.Threading.CancellationTokentoken

StoreAllAsync(IEnumerable<ApiKey>, CancellationToken)

View Source
Declaration
public virtual async Task StoreAllAsync(IEnumerable<ApiKey> apiKeys, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Collections.Generic.IEnumerable<ServiceStack.Auth.ApiKey>apiKeys
System.Threading.CancellationTokentoken

ClearAsync(CancellationToken)

View Source
Declaration
public virtual async Task ClearAsync(CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Threading.CancellationTokentoken

GetUserAuthsAsync(String, Nullable<Int32>, Nullable<Int32>, CancellationToken)

View Source
Declaration
public async Task<List<IUserAuth>> GetUserAuthsAsync(string orderBy = null, int? skip = null, int? take = null, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>>

Parameters
TypeName
System.StringorderBy
System.Nullable<System.Int32>skip
System.Nullable<System.Int32>take
System.Threading.CancellationTokentoken

SearchUserAuthsAsync(String, String, Nullable<Int32>, Nullable<Int32>, CancellationToken)

View Source
Declaration
public async Task<List<IUserAuth>> SearchUserAuthsAsync(string query, string orderBy = null, int? skip = null, int? take = null, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>>

Parameters
TypeName
System.Stringquery
System.StringorderBy
System.Nullable<System.Int32>skip
System.Nullable<System.Int32>take
System.Threading.CancellationTokentoken

Implements