Password - Initiation
Provisioning
The Password-Based Authentication Provisioning API is initiated by the user to establish a password-based credential. In response, the server issues a session ID, bearer token, and a follow-up URL. The user is required to send their chosen password in a subsequent request to the provided follow-up URL to complete the authentication process.
API Description
Method : GET
URL : https://{environment-url}/realms/{partner-id}/protocol/api/init
Parameters
client_id*
String
A unique client id that is shared for each partner.
client_secret*
String
A unique key that is generated for each product configured for the partner.
type*
String
Type of the authentication
password
{
"uri": "https://{environment-url}/realms/{partner-id}/protocol/api/required-action",
"bearerToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1NGVjNDRjMC04NDk1LTQyMTAtOWNkOS0zOGQ2ZDAwNDhjODciLCJleGVjdXRpb24iOiJ2aWRhLXBhc3N3b3JkLXJlZ2lzdGVyIiwidGFiX2lkIjoiRHloR2ZLRkRxeWsiLCJuYmYiOjE3MDMwNjI0ODAsInNlc3Npb25fY29kZSI6Ikp3Z3ZfbXZLYTlVRDFLSjhMSE1UM1pxVlR3Qy1rb19yMnZSUFRWZnBYejgiLCJzZXNzaW9uX2lkZW50aWZpZXIiOiJEeWhHZktGRHF5ayIsImV4cCI6MTcwMzA2Mjc4MCwiaWF0IjoxNzAzMDYyNDgwLCJhdXRoX3Nlc3Npb25faWQiOiI1NGVjNDRjMC04NDk1LTQyMTAtOWNkOS0zOGQ2ZDAwNDhjODciLCJqdGkiOiJkZThjMWNkOS01NDFiLTRmNzEtOGZhNC1jZWQ0ZmE1YjQyODUifQ.vkJw9mWDU68qyp17BEEmk5Nyxb0perHNljjaOHSZcQw",
"authType": "password",
"sessionIdentifier": "DyhGfKFDqyk"
}curl --location -g --request GET 'https://{environment-url}/realms/{partner-id}/protocol/api/init?client_id=api&client_secret=enESfot4PPpSWxTa74vR8D9nrW4UTtT3&type=password'import requests
url = "https://{environment-url}/realms/{partner-id}/protocol/api/init?client_id=api&client_secret=enESfot4PPpSWxTa74vR8D9nrW4UTtT3&type=password"
payload={}
headers = {}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)var axios = require('axios');
var config = {
method: 'get',
url: 'https://{environment-url}/realms/{partner-id}/protocol/api/init?client_id=api&client_secret=enESfot4PPpSWxTa74vR8D9nrW4UTtT3&type=password',
headers: { }
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});Success Response
Error Response
Response Schema
For a complete list of error codes and their meanings, refer to the Error Scenarios section.
Password Authentication API
The Password Authentication API is employed when a user intends to authenticate their identity using the password method. Upon initiating a request for authentication, the server will reply with a session ID, bearer token, and a challenge. The user must respond to this challenge by submitting the password they have chosen. The API will then validate this password against the credential stored during the provisioning phase.
API Description
Method : GET
URL : https://{environment-url}/realms/{partner-id}/protocol/api/init
Parameters
credential_id*
String
credential id generated during the process of provisioning
client_id*
String
A unique client id that is shared for each partner.
client_secret*
String
A unique key that is generated for each product configured for the partner.
type*
String
Type of the authentication
Eg:
password
Success Response
Error Response
Response Schema
For a complete list of error codes and their meanings, refer to the Error Scenarios section.
Last updated
