Record: PasswordGrantConfig

The data structure, which is used to configure the OAuth2 password grant type.

Closed record

Fields

  • tokenUrl string
  • Token URL for the authorization endpoint

  • username string
  • Username for the password grant authentication

  • password string
  • Password for the password grant authentication

  • clientId string?
  • Client ID for the password grant authentication

  • clientSecret string?
  • Client secret for the password grant authentication

  • scopes string[ ]?
  • Scope(s) of the access request

  • refreshConfig record {| string refreshUrl; string[] scopes?; map<string> optionalParams?; CredentialBearer credentialBearer = AUTH_HEADER_BEARER; ClientConfiguration clientConfig = {}; |} ?
  • Configurations for refreshing the access token

  • defaultTokenExpTime decimal(default 3600)
  • Expiration time (in seconds) of the tokens if the authorization server response does not contain an expires_in field

  • clockSkew decimal(default 0)
  • Clock skew (in seconds) that can be used to avoid token validation failures due to clock synchronization problems

  • optionalParams map<string>?
  • Map of optional parameters use for the authorization endpoint

  • credentialBearer CredentialBearer(default AUTH_HEADER_BEARER)
  • Bearer of the authentication credentials, which is sent to the authorization endpoint

  • clientConfig ClientConfiguration(default {})
  • HTTP client configurations, which are used to call the authorization endpoint