IAuthSessionExtended
Assembly: ServiceStack.dll
View Source
public interface IAuthSessionExtended : IAuthSession
Properties
Company
View Source
string Company { get; set; }
PrimaryEmail
View Source
string PrimaryEmail { get; set; }
BirthDate
View Source
DateTime? BirthDate { get; set; }
Address
View Source
string Address { get; set; }
Address2
View Source
string Address2 { get; set; }
City
View Source
string City { get; set; }
State
View Source
string State { get; set; }
PostalCode
View Source
string PostalCode { get; set; }
Country
View Source
string Country { get; set; }
PhoneNumber
View Source
string PhoneNumber { get; set; }
BirthDateRaw
View Source
string BirthDateRaw { get; set; }
Gender
View Source
string Gender { get; set; }
Audiences
View Source
List<string> Audiences { get; set; }
Scopes
View Source
List<string> Scopes { get; set; }
Dns
View Source
string Dns { get; set; }
Rsa
View Source
string Rsa { get; set; }
Sid
View Source
string Sid { get; set; }
Hash
View Source
string Hash { get; set; }
HomePhone
View Source
string HomePhone { get; set; }
MobilePhone
View Source
string MobilePhone { get; set; }
Webpage
View Source
string Webpage { get; set; }
EmailConfirmed
View Source
bool? EmailConfirmed { get; set; }
PhoneNumberConfirmed
View Source
bool? PhoneNumberConfirmed { get; set; }
TwoFactorEnabled
View Source
bool? TwoFactorEnabled { get; set; }
SecurityStamp
View Source
string SecurityStamp { get; set; }
Type
View Source
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
Task<bool> HasAllRolesAsync(ICollection<string> requiredRoles, IAuthRepositoryAsync authRepo, IRequest req, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.Collections.Generic.ICollection<System.String> | requiredRoles |
ServiceStack.Auth.IAuthRepositoryAsync | authRepo |
ServiceStack.Web.IRequest | req |
System.Threading.CancellationToken | token |
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
Task<bool> HasAnyRolesAsync(ICollection<string> roles, IAuthRepositoryAsync authRepo, IRequest req, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.Collections.Generic.ICollection<System.String> | roles |
ServiceStack.Auth.IAuthRepositoryAsync | authRepo |
ServiceStack.Web.IRequest | req |
System.Threading.CancellationToken | token |
HasAllPermissionsAsync(ICollection<String>, IAuthRepositoryAsync, IRequest, CancellationToken)
High-level overridable API that ServiceStack uses to check whether a user has all requiredPermissions.
View Source
Task<bool> HasAllPermissionsAsync(ICollection<string> requiredPermissions, IAuthRepositoryAsync authRepo, IRequest req, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.Collections.Generic.ICollection<System.String> | requiredPermissions |
ServiceStack.Auth.IAuthRepositoryAsync | authRepo |
ServiceStack.Web.IRequest | req |
System.Threading.CancellationToken | token |
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
Task<bool> HasAnyPermissionsAsync(ICollection<string> permissions, IAuthRepositoryAsync authRepo, IRequest req, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.Collections.Generic.ICollection<System.String> | permissions |
ServiceStack.Auth.IAuthRepositoryAsync | authRepo |
ServiceStack.Web.IRequest | req |
System.Threading.CancellationToken | token |
OnLoad(IRequest)
Fired before Session is resolved
View Source
void OnLoad(IRequest httpReq)
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
OnRegisteredAsync(IRequest, IAuthSession, IServiceBase, CancellationToken)
Called when the user is registered or on the first OAuth login
View Source
Task OnRegisteredAsync(IRequest httpReq, IAuthSession session, IServiceBase service, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
ServiceStack.Auth.IAuthSession | session |
ServiceStack.IServiceBase | service |
System.Threading.CancellationToken | token |
OnAuthenticatedAsync(IServiceBase, IAuthSession, IAuthTokens, Dictionary<String, String>, CancellationToken)
Called after the user has successfully authenticated
View Source
Task OnAuthenticatedAsync(IServiceBase authService, IAuthSession session, IAuthTokens tokens, Dictionary<string, string> authInfo, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.IServiceBase | authService |
ServiceStack.Auth.IAuthSession | session |
ServiceStack.Auth.IAuthTokens | tokens |
System.Collections.Generic.Dictionary<System.String,System.String> | authInfo |
System.Threading.CancellationToken | token |
OnLogoutAsync(IServiceBase, CancellationToken)
Fired before the session is removed after the /auth/logout Service is called
View Source
Task OnLogoutAsync(IServiceBase authService, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.IServiceBase | authService |
System.Threading.CancellationToken | token |
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
IHttpResult Validate(IServiceBase authService, IAuthSession session, IAuthTokens tokens, Dictionary<string, string> authInfo)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.IServiceBase | authService |
ServiceStack.Auth.IAuthSession | session |
ServiceStack.Auth.IAuthTokens | tokens |
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
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
Type | Name |
---|---|
ServiceStack.IServiceBase | authService |
ServiceStack.Auth.IAuthSession | session |
ServiceStack.Auth.IAuthTokens | tokens |
System.Collections.Generic.Dictionary<System.String,System.String> | authInfo |
System.Threading.CancellationToken | token |