Skip to main content

IAuthSessionExtended

Assembly: ServiceStack.dll​
View Source​
Declaration
public interface IAuthSessionExtended : IAuthSession

Properties​

Company​

View Source​
Declaration
string Company { get; set; }

PrimaryEmail​

View Source​
Declaration
string PrimaryEmail { get; set; }

BirthDate​

View Source​
Declaration
DateTime? BirthDate { get; set; }

Address​

View Source​
Declaration
string Address { get; set; }

Address2​

View Source​
Declaration
string Address2 { get; set; }

City​

View Source​
Declaration
string City { get; set; }

State​

View Source​
Declaration
string State { get; set; }

PostalCode​

View Source​
Declaration
string PostalCode { get; set; }

Country​

View Source​
Declaration
string Country { get; set; }

PhoneNumber​

View Source​
Declaration
string PhoneNumber { get; set; }

BirthDateRaw​

View Source​
Declaration
string BirthDateRaw { get; set; }

Gender​

View Source​
Declaration
string Gender { get; set; }

Audiences​

View Source​
Declaration
List<string> Audiences { get; set; }

Scopes​

View Source​
Declaration
List<string> Scopes { get; set; }

Dns​

View Source​
Declaration
string Dns { get; set; }

Rsa​

View Source​
Declaration
string Rsa { get; set; }

Sid​

View Source​
Declaration
string Sid { get; set; }

Hash​

View Source​
Declaration
string Hash { get; set; }

HomePhone​

View Source​
Declaration
string HomePhone { get; set; }

MobilePhone​

View Source​
Declaration
string MobilePhone { get; set; }

Webpage​

View Source​
Declaration
string Webpage { get; set; }

EmailConfirmed​

View Source​
Declaration
bool? EmailConfirmed { get; set; }

PhoneNumberConfirmed​

View Source​
Declaration
bool? PhoneNumberConfirmed { get; set; }

TwoFactorEnabled​

View Source​
Declaration
bool? TwoFactorEnabled { get; set; }

SecurityStamp​

View Source​
Declaration
string SecurityStamp { get; set; }

Type​

View Source​
Declaration
string Type { get; set; }

Methods​

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

High-level overridable API that ServiceStack uses to check whether a user has all requiredRoles.

View Source​
Declaration
Task<bool> HasAllRolesAsync(ICollection<string> requiredRoles, IAuthRepositoryAsync authRepo, IRequest req, CancellationToken token = default(CancellationToken))
Returns​

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

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

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

High-level overridable API that ServiceStack uses to check whether a user has any of the specified roles.

View Source​
Declaration
Task<bool> HasAnyRolesAsync(ICollection<string> roles, IAuthRepositoryAsync authRepo, IRequest req, CancellationToken token = default(CancellationToken))
Returns​

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

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

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

High-level overridable API that ServiceStack uses to check whether a user has all requiredPermissions.

View Source​
Declaration
Task<bool> HasAllPermissionsAsync(ICollection<string> requiredPermissions, IAuthRepositoryAsync authRepo, IRequest req, CancellationToken token = default(CancellationToken))
Returns​

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

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

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

High-level overridable API that ServiceStack uses to check whether a user has any of the specified roles.

View Source​
Declaration
Task<bool> HasAnyPermissionsAsync(ICollection<string> permissions, IAuthRepositoryAsync authRepo, IRequest req, CancellationToken token = default(CancellationToken))
Returns​

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

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

OnLoad(IRequest)​

Fired before Session is resolved

View Source​
Declaration
void OnLoad(IRequest httpReq)
Parameters​
TypeName
ServiceStack.Web.IRequesthttpReq

OnRegisteredAsync(IRequest, IAuthSession, IServiceBase, CancellationToken)​

Called when the user is registered or on the first OAuth login

View Source​
Declaration
Task OnRegisteredAsync(IRequest httpReq, IAuthSession session, IServiceBase service, CancellationToken token = default(CancellationToken))
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Auth.IAuthSessionsession
ServiceStack.IServiceBaseservice
System.Threading.CancellationTokentoken

OnAuthenticatedAsync(IServiceBase, IAuthSession, IAuthTokens, Dictionary<String, String>, CancellationToken)​

Called after the user has successfully authenticated

View Source​
Declaration
Task OnAuthenticatedAsync(IServiceBase authService, IAuthSession session, IAuthTokens tokens, Dictionary<string, string> authInfo, CancellationToken token = default(CancellationToken))
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens
System.Collections.Generic.Dictionary<System.String,System.String>authInfo
System.Threading.CancellationTokentoken

OnLogoutAsync(IServiceBase, CancellationToken)​

Fired before the session is removed after the /auth/logout Service is called

View Source​
Declaration
Task OnLogoutAsync(IServiceBase authService, CancellationToken token = default(CancellationToken))
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
ServiceStack.IServiceBaseauthService
System.Threading.CancellationTokentoken

Validate(IServiceBase, IAuthSession, IAuthTokens, Dictionary<String, String>)​

Override with Custom Validation logic to Assert if User is allowed to Authenticate. Returning a non-null response invalidates Authentication with IHttpResult response returned to client.

View Source​
Declaration
IHttpResult Validate(IServiceBase authService, IAuthSession session, IAuthTokens tokens, Dictionary<string, string> authInfo)
Returns​

ServiceStack.Web.IHttpResult

Parameters​
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens
System.Collections.Generic.Dictionary<System.String,System.String>authInfo

ValidateAsync(IServiceBase, IAuthSession, IAuthTokens, Dictionary<String, String>, CancellationToken)​

Override with Custom Validation logic to Assert if User is allowed to Authenticate. Returning a non-null response invalidates Authentication with IHttpResult response returned to client.

View Source​
Declaration
Task<IHttpResult> ValidateAsync(IServiceBase authService, IAuthSession session, IAuthTokens tokens, Dictionary<string, string> authInfo, CancellationToken token = default(CancellationToken))
Returns​

System.Threading.Tasks.Task<ServiceStack.Web.IHttpResult>

Parameters​
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens
System.Collections.Generic.Dictionary<System.String,System.String>authInfo
System.Threading.CancellationTokentoken