IIdentityApi Interface |
Namespace: Casewhere.Runtime.DSL.Api
public interface IIdentityApi
The IIdentityApi type exposes the following members.
Name | Description | |
---|---|---|
CheckUserSessionValidity |
Check user session still valid/active
Examples var identityApi = ctx.Use<IIdentityApi>(); identityApi.CheckUserSessionValidity("623977EE-BD06-4256-8D66-9B94A7BE6FCC"); | |
CreateAuthorizationCode |
To create an authorization code to serve for getting the access token later.
Examples var identityApi = ctx.Use<IIdentityApi>(); var model = new AuthorizationCodeModel { WorkerSiteDomain = "your-worker.casewhere.com", Username = "NemUser", Claims = new Dictionary<string, string>{ { "CPR", "12345" } }, ExpiredSessionMinutes = 180 }; identityApi.CreateAuthorizationCode(model); | |
GetUserClaimsBySPIdPSession |
Get the claim collection of a given SPIDPSessionId
| |
GetUserClaimsByUserSessionId |
Get the claim collection of a given UserSessionId
| |
Impersonate |
To pretend to be someone else by changing another username
Examples var identityApi = ctx.Use<IIdentityApi>(); identityApi.Impersonate("dtt"); | |
SetClaim |
Set the new claim into identity
Examples var identityApi = ctx.Use<IIdentityApi>(); identityApi.SetClaim("CPR", "123456789"); | |
SetClaimForSPIdPSession |
Update the claim set of the given SPIdPSession and this update will affect to the access token later
Examples var identityApi = ctx.Use<IIdentityApi>(); identityApi.SetClaimForSPIdPSession("00000000-0000-0000-0000-000000000000", "CPR", "123456789"); | |
SetClaimForUserSession |
Update the claim set of the given UserSession and this update will affect to the access token right after
Examples var identityApi = ctx.Use<IIdentityApi>(); identityApi.SetClaimForUserSession("00000000-0000-0000-0000-000000000000", "CPR", "123456789"); | |
TerminateAccessToken |
To terminate all user sessions related to given access token.
Examples var identityApi = ctx.Use<IIdentityApi>(); identityApi.TerminateAccessToken("Enter your access token"); | |
TerminateUserSession |
To terminate the user session of given username.
Examples var identityApi = ctx.Use<IIdentityApi>(); identityApi.TerminateUserSession("dtt"); | |
TryToGetUserToken |
Try to get the user token from the given access token.
|