Token Endpoint
This endpoint allows the client to exchange an authorization code for an ID token and an access token.
The ID token is a JWT that includes user information in the
sub
claim and is signed by Corppass. Relying Parties (RPs) can verify the JWT's signature using the public keys available at the Corppass JWKS endpoint.The Access Token is a signed JWS intended for the Corppass resource server (e.g.
/authorization-info
).
Supported Grant Types
Grant types define the method by which a client obtains tokens from the authorization server. For the Open ID Connect (OIDC) authentication flow, Corppass supports the following grant types:
authorization_code
Authorization Code Grant
The authorization_code
grant type allows the client to exchange an authorization code (provided to the client after the user is authenticated) for an ID token and an access token. This grant is restricted to confidential clients, which must authenticate themselves using Client Assertion JWT. The client must include a JSON Web Token (JWT) in the token request body. Corppass will verify the JWT's signature using the public key provided in the JSON Web Key Set (JWKS) during client onboarding.
Request
Request Headers
Content-Type
application/x-www-form-urlencoded; charset=utf-8
Request Body
redirect_uri
The redirect URI used in the current authentication session.
grant_type
The type of grant being requested. This must be set to authorization_code
.
code
The authorization code issued during the /authorize
call.
client_assertion_type
Must be set to urn:ietf:params:oauth:client-assertion-type:jwt-bearer
client_assertion
client_id
The client identifier assigned to the Relying Party during onboarding with Corppass.
code_verifier
A cryptographic random string generated and is used to compare with code_challenge
sent during the /authorize or /request call.
Response
Successful Response Example
Response Body Fields
access_token
Yes
JWS
scope
Yes
String
The scopes granted for the issued tokens. This field may include openid
along with other scopes requested during authorization.
id_token
Yes
JWE
token_type
Yes
String
The type of token issued. Currently, only Bearer
is supported.
expires_in
Yes
Numeric
The remaining lifetime of the access token in seconds.
Last updated