Skip to main content

AuthUserSession

Assembly: ServiceStack.dll
View Source
Declaration
[DataContract]
public class AuthUserSession : IAuthSessionExtended, IAuthSession, IMeta

Properties

ReferrerUrl

View Source
Declaration
[DataMember(Order = 1)]
public string ReferrerUrl { get; set; }

Id

View Source
Declaration
[DataMember(Order = 2)]
public string Id { get; set; }

UserAuthId

View Source
Declaration
[DataMember(Order = 3)]
public string UserAuthId { get; set; }

UserAuthName

User chosen Username when available or Email

View Source
Declaration
[DataMember(Order = 4)]
public string UserAuthName { get; set; }

UserName

View Source
Declaration
[DataMember(Order = 5)]
public string UserName { get; set; }

TwitterUserId

View Source
Declaration
[DataMember(Order = 6)]
public string TwitterUserId { get; set; }

TwitterScreenName

View Source
Declaration
[DataMember(Order = 7)]
public string TwitterScreenName { get; set; }

FacebookUserId

View Source
Declaration
[DataMember(Order = 8)]
public string FacebookUserId { get; set; }

FacebookUserName

View Source
Declaration
[DataMember(Order = 9)]
public string FacebookUserName { get; set; }

FirstName

View Source
Declaration
[DataMember(Order = 10)]
public string FirstName { get; set; }

LastName

View Source
Declaration
[DataMember(Order = 11)]
public string LastName { get; set; }

DisplayName

View Source
Declaration
[DataMember(Order = 12)]
public string DisplayName { get; set; }

Company

View Source
Declaration
[DataMember(Order = 13)]
public string Company { get; set; }

Email

View Source
Declaration
[DataMember(Order = 14)]
public string Email { get; set; }

PrimaryEmail

View Source
Declaration
[DataMember(Order = 15)]
public string PrimaryEmail { get; set; }

PhoneNumber

View Source
Declaration
[DataMember(Order = 16)]
public string PhoneNumber { get; set; }

BirthDate

View Source
Declaration
[DataMember(Order = 17)]
public DateTime? BirthDate { get; set; }

BirthDateRaw

View Source
Declaration
[DataMember(Order = 18)]
public string BirthDateRaw { get; set; }

Address

View Source
Declaration
[DataMember(Order = 19)]
public string Address { get; set; }

Address2

View Source
Declaration
[DataMember(Order = 20)]
public string Address2 { get; set; }

City

View Source
Declaration
[DataMember(Order = 21)]
public string City { get; set; }

State

View Source
Declaration
[DataMember(Order = 22)]
public string State { get; set; }

Country

View Source
Declaration
[DataMember(Order = 23)]
public string Country { get; set; }

Culture

View Source
Declaration
[DataMember(Order = 24)]
public string Culture { get; set; }

FullName

View Source
Declaration
[DataMember(Order = 25)]
public string FullName { get; set; }

Gender

View Source
Declaration
[DataMember(Order = 26)]
public string Gender { get; set; }

Language

View Source
Declaration
[DataMember(Order = 27)]
public string Language { get; set; }

MailAddress

View Source
Declaration
[DataMember(Order = 28)]
public string MailAddress { get; set; }

Nickname

View Source
Declaration
[DataMember(Order = 29)]
public string Nickname { get; set; }

PostalCode

View Source
Declaration
[DataMember(Order = 30)]
public string PostalCode { get; set; }

TimeZone

View Source
Declaration
[DataMember(Order = 31)]
public string TimeZone { get; set; }

RequestTokenSecret

View Source
Declaration
[DataMember(Order = 32)]
public string RequestTokenSecret { get; set; }

CreatedAt

View Source
Declaration
[DataMember(Order = 33)]
public DateTime CreatedAt { get; set; }

LastModified

View Source
Declaration
[DataMember(Order = 34)]
public DateTime LastModified { get; set; }

Roles

View Source
Declaration
[DataMember(Order = 35)]
public List<string> Roles { get; set; }

Permissions

View Source
Declaration
[DataMember(Order = 36)]
public List<string> Permissions { get; set; }

IsAuthenticated

View Source
Declaration
[DataMember(Order = 37)]
public bool IsAuthenticated { get; set; }

FromToken

View Source
Declaration
[DataMember(Order = 38)]
public bool FromToken { get; set; }

ProfileUrl

View Source
Declaration
[DataMember(Order = 39)]
public string ProfileUrl { get; set; }

Sequence

View Source
Declaration
[DataMember(Order = 40)]
public string Sequence { get; set; }

Tag

View Source
Declaration
[DataMember(Order = 41)]
public long Tag { get; set; }

AuthProvider

View Source
Declaration
[DataMember(Order = 42)]
public string AuthProvider { get; set; }

ProviderOAuthAccess

View Source
Declaration
[DataMember(Order = 43)]
public List<IAuthTokens> ProviderOAuthAccess { get; set; }

Meta

View Source
Declaration
[DataMember(Order = 44)]
public Dictionary<string, string> Meta { get; set; }

Audiences

View Source
Declaration
[DataMember(Order = 45)]
public List<string> Audiences { get; set; }

Scopes

View Source
Declaration
[DataMember(Order = 46)]
public List<string> Scopes { get; set; }

Dns

View Source
Declaration
[DataMember(Order = 47)]
public string Dns { get; set; }

Rsa

View Source
Declaration
[DataMember(Order = 48)]
public string Rsa { get; set; }

Sid

View Source
Declaration
[DataMember(Order = 49)]
public string Sid { get; set; }

Hash

View Source
Declaration
[DataMember(Order = 50)]
public string Hash { get; set; }

HomePhone

View Source
Declaration
[DataMember(Order = 51)]
public string HomePhone { get; set; }

MobilePhone

View Source
Declaration
[DataMember(Order = 52)]
public string MobilePhone { get; set; }

Webpage

View Source
Declaration
[DataMember(Order = 53)]
public string Webpage { get; set; }

EmailConfirmed

View Source
Declaration
[DataMember(Order = 54)]
public bool? EmailConfirmed { get; set; }

PhoneNumberConfirmed

View Source
Declaration
[DataMember(Order = 55)]
public bool? PhoneNumberConfirmed { get; set; }

TwoFactorEnabled

View Source
Declaration
[DataMember(Order = 56)]
public bool? TwoFactorEnabled { get; set; }

SecurityStamp

View Source
Declaration
[DataMember(Order = 57)]
public string SecurityStamp { get; set; }

Type

View Source
Declaration
[DataMember(Order = 58)]
public string Type { get; set; }

Methods

IsAuthorized(String)

View Source
Declaration
public virtual bool IsAuthorized(string provider)
Returns

System.Boolean

Parameters
TypeName
System.Stringprovider

HasPermission(String, IAuthRepository)

View Source
Declaration
public virtual bool HasPermission(string permission, IAuthRepository authRepo)
Returns

System.Boolean

Parameters
TypeName
System.Stringpermission
ServiceStack.Auth.IAuthRepositoryauthRepo

HasPermissionAsync(String, IAuthRepositoryAsync, CancellationToken)

View Source
Declaration
public virtual async Task<bool> HasPermissionAsync(string permission, IAuthRepositoryAsync authRepo, CancellationToken token = default(CancellationToken))
Returns

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

Parameters
TypeName
System.Stringpermission
ServiceStack.Auth.IAuthRepositoryAsyncauthRepo
System.Threading.CancellationTokentoken

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

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

View Source
Declaration
public virtual async 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
public virtual async 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
public virtual async 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 permissions.

View Source
Declaration
public virtual async 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

HasRole(String, IAuthRepository)

View Source
Declaration
public virtual bool HasRole(string role, IAuthRepository authRepo)
Returns

System.Boolean

Parameters
TypeName
System.Stringrole
ServiceStack.Auth.IAuthRepositoryauthRepo

HasRoleAsync(String, IAuthRepositoryAsync, CancellationToken)

View Source
Declaration
public virtual async Task<bool> HasRoleAsync(string role, IAuthRepositoryAsync authRepo, CancellationToken token = default(CancellationToken))
Returns

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

Parameters
TypeName
System.Stringrole
ServiceStack.Auth.IAuthRepositoryAsyncauthRepo
System.Threading.CancellationTokentoken

GetRoles(IAuthRepository)

View Source
Declaration
public virtual ICollection<string> GetRoles(IAuthRepository authRepo)
Returns

System.Collections.Generic.ICollection<System.String>

Parameters
TypeName
ServiceStack.Auth.IAuthRepositoryauthRepo

GetRolesAsync(IAuthRepositoryAsync, CancellationToken)

View Source
Declaration
public virtual async Task<ICollection<string>> GetRolesAsync(IAuthRepositoryAsync authRepo, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Collections.Generic.ICollection<System.String>>

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

GetPermissions(IAuthRepository)

View Source
Declaration
public virtual ICollection<string> GetPermissions(IAuthRepository authRepo)
Returns

System.Collections.Generic.ICollection<System.String>

Parameters
TypeName
ServiceStack.Auth.IAuthRepositoryauthRepo

GetPermissionsAsync(IAuthRepositoryAsync, CancellationToken)

View Source
Declaration
public virtual async Task<ICollection<string>> GetPermissionsAsync(IAuthRepositoryAsync authRepo, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Collections.Generic.ICollection<System.String>>

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

OnLoad(IRequest)

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

OnCreated(IRequest)

View Source
Declaration
public virtual void OnCreated(IRequest httpReq)
Parameters
TypeName
ServiceStack.Web.IRequesthttpReq

OnRegistered(IRequest, IAuthSession, IServiceBase)

View Source
Declaration
public virtual void OnRegistered(IRequest httpReq, IAuthSession session, IServiceBase service)
Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Auth.IAuthSessionsession
ServiceStack.IServiceBaseservice

OnRegisteredAsync(IRequest, IAuthSession, IServiceBase, CancellationToken)

View Source
Declaration
public virtual 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

OnAuthenticated(IServiceBase, IAuthSession, IAuthTokens, Dictionary<String, String>)

View Source
Declaration
public virtual void OnAuthenticated(IServiceBase authService, IAuthSession session, IAuthTokens tokens, Dictionary<string, string> authInfo)
Parameters
TypeName
ServiceStack.IServiceBaseauthService
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Auth.IAuthTokenstokens
System.Collections.Generic.Dictionary<System.String,System.String>authInfo

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

View Source
Declaration
public virtual 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

OnLogout(IServiceBase)

View Source
Declaration
public virtual void OnLogout(IServiceBase authService)
Parameters
TypeName
ServiceStack.IServiceBaseauthService

OnLogoutAsync(IServiceBase, CancellationToken)

View Source
Declaration
public virtual 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>)

View Source
Declaration
public virtual 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)

View Source
Declaration
public virtual 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

Implements