Partilhar via


JwtSecurityTokenHandler.CreateActorValue(ClaimsIdentity) Method

Definition

Creates the 'value' for the actor claim: { actort, 'value' }

protected virtual string CreateActorValue (System.Security.Claims.ClaimsIdentity actor);
abstract member CreateActorValue : System.Security.Claims.ClaimsIdentity -> string
override this.CreateActorValue : System.Security.Claims.ClaimsIdentity -> string
Protected Overridable Function CreateActorValue (actor As ClaimsIdentity) As String

Parameters

actor
ClaimsIdentity

ClaimsIdentity as actor.

Returns

String representing the actor.

Exceptions

'actor' is null.

Remarks

If BootstrapContext is not null:

If 'type' is 'string', return as string.

if 'type' is 'BootstrapContext' and 'BootstrapContext.SecurityToken' is 'JwtSecurityToken'

if 'JwtSecurityToken.RawData' != null, return RawData.

else return WriteToken(SecurityToken).

if 'BootstrapContext.Token' != null, return 'Token'.

default: WriteToken(SecurityToken) new ( JwtSecurityToken( actor.Claims ).

Applies to