The following corresponds to the Ocean middle-end services for the Unified Login.
Verify
<aside>
💡
Take a look inside the verify process: https://miro.com/app/board/uXjVOdpLrPQ=/?moveToWidget=3458764608535233131&cot=14
</aside>
Using the global token, it creates the session in ocean and selects an account to the user.
method: GET
path: /ocean-auth-service/verify
Possible responses:
- 301 redirection: Create session cookies (“oc-hosted-id” and “oc-hosted-refresh”) and redirects to:
- OCEAN_FRONT_URL/unified-login: if the user has only one account.
- OCEAN_FRONT_URL/auth/select-account: if the user has more than one account.
- UNIFIED_LOGIN_FRONT_URL/login?c=403: if an unexpeted error occurs.
- UNIFIED_LOGIN_FRONT_URL/login?c={something different to 403}: if a security validation error occurs.
Authorization
- Validate that both the global token and the ocean token are valid tokens and correspond to a current session.
- In addition, passing one (or more) “PermissionsKeyName” will validate that the user has those permissions.
method: POST
path: /ocean-auth-service/authorization
Possible responses:
- 200 ok. Both tokens are valid, and the user has permissions returns all the user information.
403 forbidden. User does not have any of the permissions listed in permissionsKeyNames.
401 unauthorized. User does not have valid tokens.
Logout