Development and Integration with eSignet
Prerequisites
Requirement
Description
🛠️ Step-by-Step implementation:
Step 1: Redirect user to eSignet Authorization Endpoint
https://<eSignet-domain>/plugins/sign-in-button-plugin.jsopenapi: 3.0.1
paths:
/authorize:
get:
tags:
- OIDC
summary: Authorization Endpoint
description: |-
This is the authorize endpoint of Open ID Connect (OIDC). The relying party applications will do a browser redirect to this endpoint with all required details passed as query parameters.
This endpoint will respond with a basic HTML page to load a JS application in the browser. UI JS application will then echo all the query parameters received in this endpoint to the "/authorization/oauth-details" endpoint as the request body.
All the validations on the query parameter values will be performed in the "/authorization/oauth-details" endpoint.
**Authentication & Authroization**: None
operationId: get-authorize
parameters:
- name: scope
in: query
description: Specifies what access privileges are being requested for Access Tokens. The scopes associated with Access Tokens determine what resources will be available when they are used to access OAuth 2.0 protected endpoints. OpenID Connect requests MUST contain the OpenID scope value.
required: true
schema:
type: string
enum:
- openid profile
- openid
- profile
- email
- address
- phone
- offline_access
default: openid profile
- name: response_type
in: query
description: 'The value set here determines the authorization processing flow. To use the Authorization Code Flow, the value should be configured to "code".'
required: true
schema:
const: code
- name: client_id
in: query
description: Valid OAuth 2.0 Client Identifier in the Authorization Server.
required: true
schema:
type: string
maxLength: 256
- name: redirect_uri
in: query
description: Redirection URI to which the response would be sent. This URI must match one of the redirection URI values during the client ID creation.
required: true
schema:
type: string
format: uri
- name: state
in: query
description: 'Opaque value used to maintain state between the request and the callback. Typically, Cross-Site Request Forgery (CSRF, XSRF) mitigation is done by cryptographically binding the value of this parameter with a browser cookie.'
schema:
type: string
maxLength: 256
- name: nonce
in: query
description: 'String value used to associate a Client session with an ID Token, and to mitigate replay attacks. The value is passed through unmodified from the Authentication Request to the ID Token.'
schema:
type: string
- name: display
in: query
description: ASCII string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the end user.
schema:
type: string
enum:
- page
- popup
- touch
- wap
- name: prompt
in: query
description: Space delimited case-sensitive list of ASCII string values that specifies whether the Authorization Server prompts the End-User for re-authentication and consent.
schema:
type: string
enum:
- none
- login
- consent
- select_account
examples:
- consent
- name: max_age
in: query
description: 'Maximum Authentication Age. This specifies the allowable elapsed time in seconds since the last time the end user was actively authenticated by the OP. If the elapsed time is greater than this value, then the OP MUST attempt to actively re-authenticate the end user. The max_age request parameter corresponds to the OpenID 2.0 PAPE [OpenID.PAPE] max_auth_age request parameter. When max_age is used, the ID Token returned MUST include an auth_time claim value.'
schema:
type: number
- name: ui_locales
in: query
description: 'End user''s preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value "fr-CA fr en" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.'
schema:
type: string
- name: acr_values
in: query
description: 'Requested Authentication Context Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication Context Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter.'
schema:
type: string
enum:
- 'mosip:idp:acr:password'
- 'mosip:idp:acr:static-code'
- 'mosip:idp:acr:generated-code'
- 'mosip:idp:acr:linked-wallet'
- 'mosip:idp:acr:biometrics'
- 'mosip:idp:acr:knowledge'
- 'mosip:idp:acr:id-token'
- name: claims_locales
in: query
description: 'End-User''s preferred languages and scripts for Claims being returned, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.'
schema:
type: string
- name: claims
in: query
description: This parameter is used to request specific claims to be returned. The value is a JSON object listing the requested claims. The claims parameter value is represented in an OAuth 2.0 request as UTF-8 encoded JSON.
schema:
type: string
- name: code_challenge
in: query
description: 'A challenge derived from the code_verifier, This is required if its a VC scoped request.'
schema:
type: string
- name: code_challenge_method
in: query
description: 'A method that was used to derive code challenge, This will be required if code_challenge is provided.'
schema:
type: string
- schema:
type: string
in: query
description: ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client.
name: id_token_hint
- schema:
type: string
in: query
description: 'The request URI corresponding to the pushed authorization request posted. This URI is a single-use reference to the respective request data in the subsequent authorization request.'
name: request_uri
responses:
'200':
description: |-
OK
Loads JS application, and validates the provided query parameters using oauth-details endpoint.
servers:
- url: 'https://esignet.collab.mosip.net/v1/esignet'
x-stoplight:
id: bx55bzakduy97PAR Support in Authorization Request
Step 2: User Authenticates and Consent on eSignet Screen
Step 3: Exchange Code for Tokens
Step 4: Verify & Parse the Access & ID Token
Step 5: Get Consented User Claims Using Access Token
Last updated
Was this helpful?