Interface IUserInfoService
This service can be used in web applications that use Dangl.Identity for authentication ///
Namespace: Dangl.Identity.Client.Mvc.Services
Assembly: Dangl.Identity.Client.Mvc.dll
Syntax
public interface IUserInfoService
Methods
| Improve this Doc View SourceClientIsAuthenticatedAsync()
Returns true if a client is authenticated. This is also true if a user is authenticated via a Jwt token generated for a client.
Declaration
Task<bool> ClientIsAuthenticatedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
GetClientClaimsAsync()
This returns all claims prefixed with "client_" for the current principal.
Declaration
Task<List<Claim>> GetClientClaimsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.List<System.Security.Claims.Claim>> |
GetCurrentClientIdAsync()
Returns the ClientId from the currently authenticated client
Declaration
Task<string> GetCurrentClientIdAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |
GetCurrentUserEmailAsync()
This relies on an actual user being authenticated. Will return null if no user is authenticated.
Declaration
Task<string> GetCurrentUserEmailAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |
GetCurrentUserIdAsync()
This relies on an actual user being authenticated. This will throw if no user is authenticated.
Declaration
Task<Guid> GetCurrentUserIdAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Guid> |
GetCurrentUserIdenticonIdAsync()
This relies on an actual user being authenticated. This will throw if no user is authenticated.
Declaration
Task<Guid> GetCurrentUserIdenticonIdAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Guid> |
GetCurrentUserNameAsync()
This relies on an actual user being authenticated. Will return null if no user is authenticated.
Declaration
Task<string> GetCurrentUserNameAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |
GetUserClaimsAsync()
Returns a list of all the user claims. This includes client claims that are prefixed with "client_".
Declaration
Task<List<Claim>> GetUserClaimsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.List<System.Security.Claims.Claim>> |
UserIsAuthenticatedAsync()
Returns true if the current principal is a user. False if only a client is authenticated.
Declaration
Task<bool> UserIsAuthenticatedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |