Learn about using JWT bearer-token authentication for gRPC requests.
Authorization: <type> <credentials>, where the authorization
type is Bearer followed by your JWT access token credentials, similar to the following
example.
headers: {
Authorization: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzd......G8p-_cD0"
}
The authenticate request/response includes a long-lived refresh token, which can be used to get a new access-token when the previous access-token expires, as shown in the following code snippet.
service Auth {
rpc Authenticate (AuthenticateRequest) returns (AuthenticateResponse);
rpc GetAccessToken (RefreshToken) returns (AccessToken);
}
For more information about implementing JWT token-based authentication, see the the application YANG Reference Guide.