access_token
) is an opaque string representing an authorization issued to the application. It may denote an identifier used to retrieve the authorization information or may self-contain the authorization information (for example, the user’s identity, permissions, and so forth) in a verifiable manner.It is quite common for Access Tokens to be implemented as JSON Web Tokens.For more information on Auth0 Access Tokens refer to Access Token.scope
claim.
Subsequently, when the client passes along the Access Token when making requests to the API, the API can inspect the scope
claim to ensure that the required permissions were granted in order to call the particular API endpoint.
read:timesheets
), creating timesheets (scope create:timesheets
), deleting timesheets (scope delete:timesheets
) and approving timesheets (scope approve:timesheets
).When a client asks the API to create a new timesheet entry, then the Access Token should contain the create:timesheets
scope. In a similar fashion, in order to delete existing timesheets, the Access Token should contain the delete:timesheets
scope.For more information on scopes refer to Scopes.authorization_code
. This happens because the application, which is typically a JavaScript app running within a browser, is less trusted than a web app running on the server, hence cannot be trusted with the client_secret
(which is required in the Authorization Code Grant).
Once the user authenticates, the application receives the and Access Token in the hash fragment of the URI. The application can now use the ID Token to obtain information about the user, and Access Token to call the API on behalf of the user.