About Echo's concept of claims

Asked 1 years ago, Updated 1 years ago, 56 views

https://echo.labstack.com/cookbook/jwt
I am looking at
What are map claims and custom claims?
What kind of concept is claim?

go go-echo jwt

2022-09-30 17:31

1 Answers

This is a term in JWT that refers to the information you want to pass over.If you're not familiar with JWT, first look at some general commentary, such as Wikipedia article.

Below is a quote from Japanese translation of JWT standard RFC 7519.

Complaint
A collection of information about a subject.Claims are represented by a name-value pair consisting of a claim name and claim value.

JSON Web Token (JWT)
By encoding a set of claims into a string representation as a JSON object into JWS or JWE, both digital signatures and MAC and encryption of claims are possible.]

echo's configuration for JWT is jwt.Claims in dgrijalva/jwt-go as a claim, so is used in , where the claim represents in the claim.It is the type that is decoded into JSON as e{}, and is standard used to represent a claim.You may want to use a custom type that is not, and that is an example of how custom claims are written.


2022-09-30 17:31

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.