JwtSecurityTokenHandler.CreateActorValue Method
Creates the 'value' for the actor claim: { actort, 'value' }
Namespace: System.IdentityModel.Tokens
Assembly: System.IdentityModel.Tokens.Jwt (in System.IdentityModel.Tokens.Jwt.dll)
Syntax
'Declaration
Protected Overridable Function CreateActorValue ( _
actor As ClaimsIdentity _
) As String
protected virtual string CreateActorValue(
ClaimsIdentity actor
)
protected:
virtual String^ CreateActorValue(
ClaimsIdentity^ actor
)
abstract CreateActorValue :
actor:ClaimsIdentity -> string
override CreateActorValue :
actor:ClaimsIdentity -> string
protected function CreateActorValue(
actor : ClaimsIdentity
) : String
Parameters
actor
Type: System.Security.Claims.ClaimsIdentityClaimsIdentity as actor.
Return Value
Type: System.String
String representing the actor.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | '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.
if 'BootstrapContext.Token' != null, return 'Token'.
default: WriteToken new ( JwtSecurityToken( actor.Claims ).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.