-
-
Use the OIDC in the AS to generate the id_token
The id_token, also known as ID Token, is a type of tokens defined in the OIDC protocol. For
more information, see
OpenID Connect Core 1.0
.
The KeyPair, keyId, and Claims are required to generate the id_token (for more information
about the Claims, see
ID_Token
).
KeyId description
The KeyId must be unique. For example, the KeyId generated using the UUID is a string of at least 32
random characters, which can be all numbers or numbers and letters.
Example (Java)
Or
KeyPair description
The KeyPair is a PKI system-based public and private key pair using the asymmetric algorithm. Each
pair contains a publicKey and a privateKey. The publicKey is stored in the RS, which is used for
verification. The privateKey is stored in the AS, which serves as the digital signature when the
id_token is generated.
The KeyPair uses the RSA SHA256 encryption algorithm. To guarantee security, 2,048 bits are
encrypted.
All KeyPairs used in the AS are in the JSON format. The following is an example:
publicKey:
privateKey:
String keyId = UUID.randomUUID().toString().replaceAll("-", "");
String keyId = String.valueOf(UUID.randomUUID().getMostSignificantBits()) +
String.valueOf(UUID.randomUUID().getMostSignificantBits());
{"kty":"RSA","kid":"67174182967979709913950471789226181721","alg":"ES256","n":"oH5WunqaqIopfOFBz9RfBVVII
cmk0WDJagAcROKFiLJScQ8N\_nrexgbCMlu-dSCUWq7XMnp1ZSqw-XBS2-XEy4W4l2Q7rx3qDWY0cP8pY83hqxTZ6-
8GErJm\_0yOzR4WO4plIVVWt96-
mxn3ZgK8kmaeotkS0zS0pYMb4EEOxFFnGFqjCThuO2pimF0imxiEWw5WCdREz1v8RW72WdEfLpTLJEOpP1FsFyG3OI
DbTYOqowD1YQEf5Nk2TqN\_7pYrGRKsK3BPpw4s9aXHbGrpwsCRwYbKYbmeJst8MQ4AgcorE3NPmp-
E6RxA5jLQ4axXrwC0T458LIVhypWhDqejUw","e":"AQAB"}
{"kty":"RSA","kid":"67174182967979709913950471789226181721","alg":"ES256","n":"oH5WunqaqIopfOFBz9RfBVVII
cmk0WDJagAcROKFiLJScQ8N\_nrexgbCMlu-dSCUWq7XMnp1ZSqw-XBS2-XEy4W4l2Q7rx3qDWY0cP8pY83hqxTZ6-
8GErJm\_0yOzR4WO4plIVVWt96-
API Gateway
User Guide for Providers
18