Module Values.CreateOAuth2TokenResponseBodySource

Response body payload for CreateOAuth2Token operation The response content depends on the grant_type from the request: grant_type=authorization_code: Returns all fields including refresh_token and id_token grant_type=refresh_token: Returns access_token, token_type, expires_in, refresh_token (no id_token)

Sourcetype nonrec t = {
  1. accessToken : AccessToken.t option;
    (*

    Scoped-down AWS credentials (15 minute duration) Present for both authorization code redemption and token refresh

    *)
  2. tokenType : TokenType.t option;
    (*

    Token type indicating this is AWS SigV4 credentials Value is "aws_sigv4" for both flows

    *)
  3. expiresIn : ExpiresIn.t option;
    (*

    Time to expiry in seconds (maximum 900) Present for both authorization code redemption and token refresh

    *)
  4. refreshToken : RefreshToken.t option;
    (*

    Encrypted refresh token with cnf.jkt (SHA-256 thumbprint of presented jwk) Always present in responses (required for both flows)

    *)
  5. idToken : IdToken.t option;
    (*

    ID token containing user identity information Present only in authorization code redemption response (grant_type=authorization_code) Not included in token refresh responses

    *)
}
Sourceval make : ?accessToken:??? -> ?tokenType:??? -> ?expiresIn:??? -> ?refreshToken:??? -> ?idToken:??? -> unit -> t
Sourceval to_value : t -> [> `Structure of (string * [> `Integer of ExpiresIn.t | `String of TokenType.t | `Structure of (string * [> `String of String_.t ]) list ]) list ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t