Login
The ConsCent SSO service allows users to authenticate themselves on the ConsCent platform. This service supports both login and logout functionalities, which can be hosted by either ConsCent or client
CONSCENT LOGIN:
The below code is used for implementing the ConsCent Login System.
User Login
To prompt the user to log in, use the following code:
Check User Authentication Status
To check whether the user is logged in, use the following code:
Fetch User Details
To retrieve the logged-in user's details, use the following code:
CLIENT LOGIN:
The SSO service utilizes a JWT (JSON Web Token) authorization code, generated upon successful login, to manage user authentication. This guide outlines the necessary steps to integrate the SSO service into your application, including endpoint details and usage examples.
Authorization Code (JWT)
Upon successful authentication, an authorization code in the form of a JWT is generated.
Signing Algorithm:
RSA256
Public Key Requirement: To verify the JWT, share your public key with ConsCent in PEM (Privacy Enhanced Mail) format. The key must be 2048 bits.
Login and Logout Endpoint
URL: The Login and Logout URLs need to be shared by the client with Conscent Team.
Functionality:
For Login: Redirects the user to the specified login page for authentication. Once authenticated, the service generates an authorization code and redirects the user to a URL specified in the redirectUrl
query parameter.
For Logout: Redirects the user to the specified logout page, logs them out.The user is then redirected to a URL specified in the redirectUrl
query parameter.
Required Parameters:
redirectUrl: Specifies the URL where the user should be redirected post-login.
clientId: Specifies the client’s unique identifier.
Example Requests:
Example Response:
Last updated