public class JsonWebSignatureJSON Web Signature (JWS) implementation as specified in http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-11.
Namespace
Google.Apis.AuthAssembly
Google.Apis.Auth.dll
Methods
VerifySignedTokenAsync(string, SignedTokenVerificationOptions, CancellationToken)
public static Task<JsonWebSignature.Payload> VerifySignedTokenAsync(string signedJwt, SignedTokenVerificationOptions options = null, CancellationToken cancellationToken = default)Verifies that the given token is a valid, not expired, signed token.
| Parameters | |
|---|---|
| Name | Description |
signedJwt |
stringThe token to verify. |
options |
SignedTokenVerificationOptionsThe options to use for verification. May be null in which case default options will be used. |
cancellationToken |
CancellationTokenThe cancellation token for the operation. |
| Returns | |
|---|---|
| Type | Description |
TaskJsonWebSignaturePayload |
The payload contained by the token. |
| Exceptions | |
|---|---|
| Type | Description |
InvalidJwtException |
If the token is invalid or expired. |
VerifySignedTokenAsync<TPayload>(string, SignedTokenVerificationOptions, CancellationToken)
public static Task<TPayload> VerifySignedTokenAsync<TPayload>(string signedJwt, SignedTokenVerificationOptions options = null, CancellationToken cancellationToken = default) where TPayload : JsonWebSignature.PayloadVerifies that the given token is a valid, not expired, signed token.
| Parameters | |
|---|---|
| Name | Description |
signedJwt |
stringThe token to verify. |
options |
SignedTokenVerificationOptionsThe options to use for verification. May be null in which case default options will be used. |
cancellationToken |
CancellationTokenThe cancellation token for the operation. |
| Returns | |
|---|---|
| Type | Description |
Task |
The payload contained by the token. |
| Type Parameter | |
|---|---|
| Name | Description |
TPayload |
The type of the payload to return, so user code can validate additional claims. Should extend JsonWebSignature.Payload. Payload information will be deserialized using Instance. |
| Exceptions | |
|---|---|
| Type | Description |
InvalidJwtException |
If the token is invalid or expired. |