JwtSecurityTokenHandler.CreateJwtSecurityToken メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
CreateJwtSecurityToken(String, String, ClaimsIdentity, Nullable<DateTime>, Nullable<DateTime>, Nullable<DateTime>, SigningCredentials, EncryptingCredentials, IDictionary<String,Object>)
を作成します。 JwtSecurityToken
public virtual System.IdentityModel.Tokens.Jwt.JwtSecurityToken CreateJwtSecurityToken(string issuer, string audience, System.Security.Claims.ClaimsIdentity subject, DateTime? notBefore, DateTime? expires, DateTime? issuedAt, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials, System.Collections.Generic.IDictionary<string,object> claimCollection);
abstract member CreateJwtSecurityToken : string * string * System.Security.Claims.ClaimsIdentity * Nullable<DateTime> * Nullable<DateTime> * Nullable<DateTime> * Microsoft.IdentityModel.Tokens.SigningCredentials * Microsoft.IdentityModel.Tokens.EncryptingCredentials * System.Collections.Generic.IDictionary<string, obj> -> System.IdentityModel.Tokens.Jwt.JwtSecurityToken
override this.CreateJwtSecurityToken : string * string * System.Security.Claims.ClaimsIdentity * Nullable<DateTime> * Nullable<DateTime> * Nullable<DateTime> * Microsoft.IdentityModel.Tokens.SigningCredentials * Microsoft.IdentityModel.Tokens.EncryptingCredentials * System.Collections.Generic.IDictionary<string, obj> -> System.IdentityModel.Tokens.Jwt.JwtSecurityToken
Public Overridable Function CreateJwtSecurityToken (issuer As String, audience As String, subject As ClaimsIdentity, notBefore As Nullable(Of DateTime), expires As Nullable(Of DateTime), issuedAt As Nullable(Of DateTime), signingCredentials As SigningCredentials, encryptingCredentials As EncryptingCredentials, claimCollection As IDictionary(Of String, Object)) As JwtSecurityToken
パラメーター
- issuer
- String
トークンの発行者。
- audience
- String
このトークンの対象ユーザー。
- subject
- ClaimsIdentity
このトークンの Claimのソース。
- signingCredentials
- SigningCredentials
署名を生成するための暗号化マテリアルが含まれています。
- encryptingCredentials
- EncryptingCredentials
トークンを暗号化するための暗号化マテリアルが含まれています。
- claimCollection
- IDictionary<String,Object>
このトークンの Claimを表す (キー、値) ペアのコレクション。
返品
JwtSecurityToken です。
例外
expires
<= notBeforeの場合。
注釈
Actorが null でない場合、要求 { actort, 'value' } がペイロードに追加されます。 CreateActorValue(ClaimsIdentity) 値の作成方法について詳しく説明します。
ヘッダーに HeaderParameters を追加する方法の詳細については、 <seealso cref="T:System.IdentityModel.Tokens.Jwt.JwtHeader"></seealso> を参照してください。
ペイロードに値を追加する方法の詳細については、 <seealso cref="T:System.IdentityModel.Tokens.Jwt.JwtPayload"></seealso> を参照してください。
追加されたsubjectの各Claimは、OutboundClaimTypeMapで見つかったマッピングに従ってType変換されます。
OutboundClaimTypeMapへの追加と削除は、Json 要求の名前コンポーネントに影響します。
SigningCredentials(SecurityKey, String) は、 RawDataに署名するために使用されます。
EncryptingCredentials(SecurityKey, String, String) は、 RawData または RawPayload を暗号化するために使用されます。
適用対象
CreateJwtSecurityToken(String, String, ClaimsIdentity, Nullable<DateTime>, Nullable<DateTime>, Nullable<DateTime>, SigningCredentials, EncryptingCredentials)
を作成します。 JwtSecurityToken
public virtual System.IdentityModel.Tokens.Jwt.JwtSecurityToken CreateJwtSecurityToken(string issuer, string audience, System.Security.Claims.ClaimsIdentity subject, DateTime? notBefore, DateTime? expires, DateTime? issuedAt, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, Microsoft.IdentityModel.Tokens.EncryptingCredentials encryptingCredentials);
abstract member CreateJwtSecurityToken : string * string * System.Security.Claims.ClaimsIdentity * Nullable<DateTime> * Nullable<DateTime> * Nullable<DateTime> * Microsoft.IdentityModel.Tokens.SigningCredentials * Microsoft.IdentityModel.Tokens.EncryptingCredentials -> System.IdentityModel.Tokens.Jwt.JwtSecurityToken
override this.CreateJwtSecurityToken : string * string * System.Security.Claims.ClaimsIdentity * Nullable<DateTime> * Nullable<DateTime> * Nullable<DateTime> * Microsoft.IdentityModel.Tokens.SigningCredentials * Microsoft.IdentityModel.Tokens.EncryptingCredentials -> System.IdentityModel.Tokens.Jwt.JwtSecurityToken
Public Overridable Function CreateJwtSecurityToken (issuer As String, audience As String, subject As ClaimsIdentity, notBefore As Nullable(Of DateTime), expires As Nullable(Of DateTime), issuedAt As Nullable(Of DateTime), signingCredentials As SigningCredentials, encryptingCredentials As EncryptingCredentials) As JwtSecurityToken
パラメーター
- issuer
- String
トークンの発行者。
- audience
- String
このトークンの対象ユーザー。
- subject
- ClaimsIdentity
このトークンの Claimのソース。
- signingCredentials
- SigningCredentials
署名を生成するための暗号化マテリアルが含まれています。
- encryptingCredentials
- EncryptingCredentials
トークンを暗号化するための暗号化マテリアルが含まれています。
返品
JwtSecurityToken です。
例外
expires
<= notBeforeの場合。
注釈
Actorが null でない場合、要求 { actort, 'value' } がペイロードに追加されます。 CreateActorValue(ClaimsIdentity) 値の作成方法について詳しく説明します。
ヘッダーに HeaderParameters を追加する方法の詳細については、 <seealso cref="T:System.IdentityModel.Tokens.Jwt.JwtHeader"></seealso> を参照してください。
ペイロードに値を追加する方法の詳細については、 <seealso cref="T:System.IdentityModel.Tokens.Jwt.JwtPayload"></seealso> を参照してください。
追加されたsubjectの各Claimは、OutboundClaimTypeMapで見つかったマッピングに従ってType変換されます。
OutboundClaimTypeMapへの追加と削除は、Json 要求の名前コンポーネントに影響します。
SigningCredentials(SecurityKey, String) は、 RawDataに署名するために使用されます。
EncryptingCredentials(SecurityKey, String, String) は、 RawData または RawPayload を暗号化するために使用されます。
適用対象
CreateJwtSecurityToken(SecurityTokenDescriptor)
Json Web トークン (JWT) を作成します。
public virtual System.IdentityModel.Tokens.Jwt.JwtSecurityToken CreateJwtSecurityToken(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor);
abstract member CreateJwtSecurityToken : Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Tokens.Jwt.JwtSecurityToken
override this.CreateJwtSecurityToken : Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Tokens.Jwt.JwtSecurityToken
Public Overridable Function CreateJwtSecurityToken (tokenDescriptor As SecurityTokenDescriptor) As JwtSecurityToken
パラメーター
- tokenDescriptor
- SecurityTokenDescriptor
トークンの内容の詳細を含む SecurityTokenDescriptor 。
返品
注釈
SigningCredentials は、 RawDataに署名するために使用されます。
適用対象
CreateJwtSecurityToken(String, String, ClaimsIdentity, Nullable<DateTime>, Nullable<DateTime>, Nullable<DateTime>, SigningCredentials)
を作成します。 JwtSecurityToken
public virtual System.IdentityModel.Tokens.Jwt.JwtSecurityToken CreateJwtSecurityToken(string issuer = default, string audience = default, System.Security.Claims.ClaimsIdentity subject = default, DateTime? notBefore = default, DateTime? expires = default, DateTime? issuedAt = default, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials = default);
abstract member CreateJwtSecurityToken : string * string * System.Security.Claims.ClaimsIdentity * Nullable<DateTime> * Nullable<DateTime> * Nullable<DateTime> * Microsoft.IdentityModel.Tokens.SigningCredentials -> System.IdentityModel.Tokens.Jwt.JwtSecurityToken
override this.CreateJwtSecurityToken : string * string * System.Security.Claims.ClaimsIdentity * Nullable<DateTime> * Nullable<DateTime> * Nullable<DateTime> * Microsoft.IdentityModel.Tokens.SigningCredentials -> System.IdentityModel.Tokens.Jwt.JwtSecurityToken
Public Overridable Function CreateJwtSecurityToken (Optional issuer As String = Nothing, Optional audience As String = Nothing, Optional subject As ClaimsIdentity = Nothing, Optional notBefore As Nullable(Of DateTime) = Nothing, Optional expires As Nullable(Of DateTime) = Nothing, Optional issuedAt As Nullable(Of DateTime) = Nothing, Optional signingCredentials As SigningCredentials = Nothing) As JwtSecurityToken
パラメーター
- issuer
- String
トークンの発行者。
- audience
- String
このトークンの対象ユーザー。
- subject
- ClaimsIdentity
このトークンの Claimのソース。
- signingCredentials
- SigningCredentials
署名を生成するための暗号化マテリアルが含まれています。
返品
JwtSecurityToken です。
例外
expires
<= notBeforeの場合。
注釈
Actorが null でない場合、要求 { actort, 'value' } がペイロードに追加されます。 CreateActorValue(ClaimsIdentity) 値の作成方法について詳しく説明します。
ヘッダーに HeaderParameters を追加する方法の詳細については、 <seealso cref="T:System.IdentityModel.Tokens.Jwt.JwtHeader"></seealso> を参照してください。
ペイロードに値を追加する方法の詳細については、 <seealso cref="T:System.IdentityModel.Tokens.Jwt.JwtPayload"></seealso> を参照してください。
追加されたsubjectの各Claimは、OutboundClaimTypeMapで見つかったマッピングに従ってType変換されます。
OutboundClaimTypeMapへの追加と削除は、Json 要求の名前コンポーネントに影響します。
SigningCredentials(SecurityKey, String) は、 RawDataに署名するために使用されます。