List login policies
Curious as to how many login policies you have in your organization? There’s only one way to find out: call the /{customer_id}/config/loginPolicies operation. For example:
curl -X GET \
https://v1.api.us.janrain.com/01000000-0000-3000-9000-000000000000/config/loginPolicies \
-H 'Authorization: Bearer 03v-eeodppPrrHXXIx56pRLyDBaOldDxqEwI59MFCFGVuSkLRapzgmfwmEHyKWle'
When you make the preceding API call, you’ll get back information similar to the following for each of your organization’s login policies:
{
"total": 8,
"_embedded": {
"loginPolicies": [
{
"id": "6d0a11b2-f229-4198-8521-158577c9b541",
"title": "Akamai Documentation Login Policy",
"_links": {
"self": {
"href": "/01000000-0000-3000-9000-000000000000/config/loginPolicies/6d0a11b2-f229-4198-8521-158577c9b541"
}
}
},
If you’d like more detailed information about a policy, use the /{customer_id}/config/loginPolicies/{login_policy_id} operation (note the value of the href property). For example, this command returns detailed information about the login policy with the ID 6d0a11b2-f229-4198-8521-158577c9b541:
curl -X GET \
https://v1.api.us.janrain.com/01000000-0000-3000-9000-000000000000/config/loginPolicies/6d0a11b2-f229-4198-8521-158577c9b541 \
-H 'Authorization: Bearer Xk7EzdpGq5GPQcsxCWM2SxdlwU_iTsA4i2Px4TEzBrfLIvddjnDVBJxjPDuCARHH'
That returns login policy details similar to these:
{
"id": "6d0a11b2-f229-4198-8521-158577c9b541",
"identityStoreDetails": {
"type": "janrainCapture",
"connectionDetails": {
"domain": "alb.capture.multi.dev.or.janrain.com",
"applicationId": "kfcmdfudasmx9wkay7463vpdsy",
"entityType": "user",
"clientId": "96by2t9dav337mvzbybqdfcjmrsd7bn4",
"clientSecret": "tedywcxnevb6feyb88585f466dp8nsqc"
}
},
"loginURL": "https://documentation.akamai.com/login",
"title": "Akamai Documentation Login Policy",
"_links": {
"self": {
"href": "/01000000-0000-3000-9000-000000000000/config/loginPolicies/6d0a11b2-f229-4198-8521-158577c9b541"
}
}
}
Note that the login policy does not tell you which OIDC client (if any) the policy is associated with. To determine which policies go with which clients, you need to look at the property values for the client.
Updated over 2 years ago