Skip to content
DEVELOPERS

3. Authorization methods

API token and “Sign in with QAIRU”: differences and choice of method.

The API supports two authorization methods. Both methods use the same base address and the same operation paths; they differ in the subject of the request and the scope of available data.

Comparison of authorization methods
FEATUREAPI TOKENSIGN IN WITH QAIRU
Subject of the requestExternal information systemStudent who has given consent
Granting of accessThe university administration issues a tokenThe university administration registers the application; the student grants access on the consent screen
Value of the Authorization headerToken of the form qos_…Keycloak access token (JWT)
Scope of dataData of the modules specified in the tokenData available to the student, within the granted modules
ValiditySet when the token is issuedAccess token — 1 hour, session — up to 30 days
Revocation of accessUniversity administrationThe student in the student portal or the university administration

3.1. Choosing a method

  • An API token is used to integrate information systems: to obtain reference data, the schedule and the course catalog, and to access Alem models on behalf of the organization.
  • “Sign in with QAIRU” is used when an external platform works with the data of a specific student: their schedule, assignments, grades and projects.

The authorization method is determined by the value of the Authorization: Bearer header: a value starting with qos_ is treated as an API token, any other value as a Keycloak access token. The x-api-key header accepts an API token only.

Both methods are intended for server applications. The API token, the client secret and student tokens are not placed in code executed in a browser or in a mobile application, nor in publicly accessible repositories.