Authorization
AIRisk API implements an Authorization Code Grant flow. This is a two-step process.
Authorization Request: Your application directs the user’s browser to AIRisk’s Authorization Endpoint with your
client_id, aredirect_uri, optionally astatestring, and optionally auseridif you are requesting a user-specific token. If requesting a user-specific token, theuseridmust be an existingidon someApplicationUserin the AIRisk deployment. Also,client_idandclient_secretmust be valid for someAPIUserin the instances database.redirect_urimust match at least one comma-separated value in the sameAPIUsers (as the client id & secret)redirect_uricolumn
Authorization Code Redirect: If AIRisk’s authorization server authorizes the request, then it redirects the client back to the specified
redirect_uriwith an authorization code in the URL (e.g. https://localhost/callback?code=REMOTELY_GENERATED_AUTH_CODE_HERE). This code is short-lived and cannot be used by itself except to request a token. Ifstatewas provided in the initial request, then there should be a matching state parameter and value in the URL coming from the redirect (e.g. https://localhost/callback?state=MATCHING_STATE_VALUE&code=REMOTELY_GENERATED_AUTH_CODE_HERE).
Last updated
