Skip to main content

OAuth2 Authentication

The OAuth2 standard defines several grant types (or flows) to request and get an access token:

  • Authorization Code
  • Implicit
  • Client Credentials

Currently, Restonomer supports only Client Credentials grant type.

In order to use OAuth2 authentication in checkpoint, user need to provide below parameters:

Parameter NameMandatoryDefault ValueDescription
token-urlYes-URL to get the access token
client-idYes-The client ID for your app
client-secretYes-The client secret key for your app
scopeNoNoneA space-separated list of scopes

User can configure OAuth2 authentication in checkpoint file in below manner:

authentication = {
type = "OAuth2Authentication"
grant-type = {
name = "ClientCredentials"
token-url = "http://localhost:8080/api/token"
client-id = "test_client_id"
client-secret = "test_client_secret"
scope = "user-read-playback-state user-modify-playback-state"
}
}