Skip to main content

AuthSessionExtensions

Assembly: ServiceStack.dll
View Source
Declaration
public static class AuthSessionExtensions

Methods

AddAuthToken(IAuthSession, IAuthTokens)

View Source
Declaration
public static void AddAuthToken(this IAuthSession session, IAuthTokens tokens)
Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens

GetAuthTokens(IAuthSession)

View Source
Declaration
public static List<IAuthTokens> GetAuthTokens(this IAuthSession session)
Returns

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

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession

GetAuthTokens(IAuthSession, String)

View Source
Declaration
public static IAuthTokens GetAuthTokens(this IAuthSession session, string provider)
Returns

ServiceStack.Auth.IAuthTokens

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
System.Stringprovider

GetProfileUrl(IAuthSession, String)

View Source
Declaration
public static string GetProfileUrl(this IAuthSession authSession, string defaultUrl = null)
Returns

System.String

Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession
System.StringdefaultUrl

GetSafeDisplayName(IAuthSession)

View Source
Declaration
public static string GetSafeDisplayName(this IAuthSession authSession)
Returns

System.String

Parameters
TypeName
ServiceStack.Auth.IAuthSessionauthSession

UpdateFromUserAuthRepoAsync(IAuthSession, IRequest, IAuthRepositoryAsync)

View Source
Declaration
public static async Task UpdateFromUserAuthRepoAsync(this IAuthSession session, IRequest req, IAuthRepositoryAsync authRepo = null)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Web.IRequestreq
ServiceStack.Auth.IAuthRepositoryAsyncauthRepo

UpdateFromUserAuthRepo(IAuthSession, IRequest, IAuthRepository)

View Source
Declaration
public static void UpdateFromUserAuthRepo(this IAuthSession session, IRequest req, IAuthRepository authRepo = null)
Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Web.IRequestreq
ServiceStack.Auth.IAuthRepositoryauthRepo

HasAllRolesAsync(IAuthSession, ICollection<String>, IAuthRepositoryAsync, IRequest, CancellationToken)

View Source
Declaration
public static Task<bool> HasAllRolesAsync(this IAuthSession session, ICollection<string> requiredRoles, IAuthRepositoryAsync authRepo, IRequest req, CancellationToken token = default(CancellationToken))
Returns

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

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
System.Collections.Generic.ICollection<System.String>requiredRoles
ServiceStack.Auth.IAuthRepositoryAsyncauthRepo
ServiceStack.Web.IRequestreq
System.Threading.CancellationTokentoken

HasAnyRolesAsync(IAuthSession, ICollection<String>, IAuthRepositoryAsync, IRequest, CancellationToken)

View Source
Declaration
public static Task<bool> HasAnyRolesAsync(this IAuthSession session, ICollection<string> roles, IAuthRepositoryAsync authRepo, IRequest req, CancellationToken token = default(CancellationToken))
Returns

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

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
System.Collections.Generic.ICollection<System.String>roles
ServiceStack.Auth.IAuthRepositoryAsyncauthRepo
ServiceStack.Web.IRequestreq
System.Threading.CancellationTokentoken

HasAllPermissionsAsync(IAuthSession, ICollection<String>, IAuthRepositoryAsync, IRequest, CancellationToken)

View Source
Declaration
public static Task<bool> HasAllPermissionsAsync(this IAuthSession session, ICollection<string> requiredPermissions, IAuthRepositoryAsync authRepo, IRequest req, CancellationToken token = default(CancellationToken))
Returns

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

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
System.Collections.Generic.ICollection<System.String>requiredPermissions
ServiceStack.Auth.IAuthRepositoryAsyncauthRepo
ServiceStack.Web.IRequestreq
System.Threading.CancellationTokentoken

HasAnyPermissionsAsync(IAuthSession, ICollection<String>, IAuthRepositoryAsync, IRequest, CancellationToken)

View Source
Declaration
public static Task<bool> HasAnyPermissionsAsync(this IAuthSession session, ICollection<string> permissions, IAuthRepositoryAsync authRepo, IRequest req, CancellationToken token = default(CancellationToken))
Returns

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

Parameters
TypeName
ServiceStack.Auth.IAuthSessionsession
System.Collections.Generic.ICollection<System.String>permissions
ServiceStack.Auth.IAuthRepositoryAsyncauthRepo
ServiceStack.Web.IRequestreq
System.Threading.CancellationTokentoken