Client Credentials Grant

The oauth_client_credentials_grant feature implements the client credentials grant flow.

Who is it for

Service-to-service secure communication, i.e. resource servers.

How to enable it

plugin :rodauth do
  enable :oauth_client_credentials_grant
end

URL

POST /token

Request Parameters

The use the token endpoint with the client credentials grant, you can set the following request parameter:

  • grant_type: "client_credentials";

Caveats

  • as stated before, token isn’t bound to any resource owner, so calling rodauth.current_oauth_account on oauth-protected routes will return nil (unlike rodauth.current_oauth_application)

Home