Authn API
Non-phishable, passwordless authentication — biometrics, OTP, push and journeys, federated over OIDC and SAML.
The Authn service delivers passwordless, phishing-resistant authentication. Drive biometric login (FaceID / TouchID with liveness), one-time passwords, TOTP and push; orchestrate multi-step authentication journeys; and federate with external identity and service providers — all issuing standards-based JWTs. FIDO2 and NIST 800-63-3 certified.
59 endpoints
across 18 resource groups.
ECDSA-signed
every request is signed with your key pair.
JSON over HTTPS
predictable REST, conventional status codes.
OpenAPI 3.0
Base URL
All Authn endpoints are relative to your environment host. Examples on this page use the 1Kosmos pilot environment — swap in your production root when you go live.
Content type
Requests and responses use application/json.
curl -X GET 'https://pilot-root.1kosmos.net/authn/healthz' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
Authentication
Authn uses ECDSA key-pair authentication. Each request carries your credentials as
HTTP headers; verification-grade calls additionally sign the request body. Retrieve the system signing
key from /publickeys.
curl -X GET 'https://pilot-root.1kosmos.net/authn/healthz' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/healthz", {
method: "GET",
headers: {
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/authn/healthz",
headers={
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json())Errors
Authn uses conventional HTTP status codes: 2xx success, 4xx a problem
with the request, 5xx a service-side error.
| Status | Meaning | Description |
|---|---|---|
| 200 / 204 | OK | The request succeeded. |
| 400 | Bad Request | Validation failed. |
| 401 | Unauthorized | Missing or invalid credentials. |
| 403 | Forbidden | Authenticated, but not permitted. |
| 404 | Not Found | The resource does not exist. |
| 500 | Server Error | Something went wrong on our side. |
{
"statusCode": 400,
"error": "Bad Request",
"message": "Validation error"
}Authenticate
Initiate and complete authentication flows.
Authenticate users
Authenticate users
License must be authorized for community
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object represents authenticated user and public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}
Validation: 1. Username is required 2. At least one of password, pin, or otp should be provided
| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"schemeId": "string optional", "moduleId": "string optional", "SAMLResponse": "string optional", "credentials": {"username": "string optional", "password": "string optional", "dn": "string optional", "otp": "string optional", "isPasswordDeferred": "boolean optional", "isSharedPasswordDeferred": "boolean optional", "pin": "string optional", "isOtpFromUwl": "boolean optional"}, "jwt": "string optional"}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"schemeId": "string optional",
"moduleId": "string optional",
"SAMLResponse": "string optional",
"credentials": {
"username": "string optional",
"password": "string optional",
"dn": "string optional",
"otp": "string optional",
"isPasswordDeferred": "boolean optional",
"isSharedPasswordDeferred": "boolean optional",
"pin": "string optional",
"isOtpFromUwl": "boolean optional"
},
"jwt": "string optional"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"schemeId": "string optional",
"moduleId": "string optional",
"SAMLResponse": "string optional",
"credentials": {
"username": "string optional",
"password": "string optional",
"dn": "string optional",
"otp": "string optional",
"isPasswordDeferred": "boolean optional",
"isSharedPasswordDeferred": "boolean optional",
"pin": "string optional",
"isOtpFromUwl": "boolean optional"
},
"jwt": "string optional"
}
},
)
print(res.json()){
"data": {
"user": {
"type": "basic",
"email_verified": true,
"disabled": false,
"username": "Username",
"status": "active",
"firstname": "Fname",
"middlename": "Mname",
"lastname": "Lname",
"email": "email@email.email",
"phone": "111111111",
"phone_verified": true,
"address": {
"house": "House",
"streetname": "Streetname",
"city": "City",
"country": "Country",
"zip": "Zip"
},
"address_verified": true,
"uid": "6cc4cc4e-eac9-478f-a871-976ff007ee29",
"dguid": "6cc4cc4e-eac9-478f-a871-976ff007ee29",
"tenantId": "607714223fc37d72a2422e86",
"communityId": "607714223fd37d72a2422e87",
"roleValue": "none"
},
"proof_of_authentication_jwt": "jwt"
},
"publicKey": "xxxxxxx",
"signature_token": "xxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "username"
}
]// no response body
// no response body
Authenticate users with behavior (typing pattern)
Authenticate users using typing pattern. License must be authorized for community. Returns user object and JWT with behavior_auth method if successful.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}
Validation: 1. Username is required 2. TypingPattern is required
| Field | Type | Description |
|---|---|---|
| username | string | — |
| authModule | string | — |
| pattern | string | — |
| jwt | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_behavior_auth' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"username": "string", "authModule": "string", "pattern": "string", "jwt": "string"}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_behavior_auth", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"username": "string",
"authModule": "string",
"pattern": "string",
"jwt": "string"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_behavior_auth",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"username": "string",
"authModule": "string",
"pattern": "string",
"jwt": "string"
},
)
print(res.json()){
"data": {
"user": {
"type": "basic",
"email_verified": true,
"disabled": false,
"username": "Username",
"status": "active",
"firstname": "Fname",
"middlename": "Mname",
"lastname": "Lname",
"email": "email@email.email",
"phone": "111111111",
"phone_verified": true,
"address": {
"house": "House",
"streetname": "Streetname",
"city": "City",
"country": "Country",
"zip": "Zip"
},
"address_verified": true,
"uid": "6cc4cc4e-eac9-478f-a871-976ff007ee29",
"dguid": "6cc4cc4e-eac9-478f-a871-976ff007ee29",
"tenantId": "607714223fc37d72a2422e86",
"communityId": "607714223fd37d72a2422e87",
"roleValue": "none"
},
"proof_of_authentication_jwt": "jwt"
},
"publicKey": "xxxxxxx",
"signature_token": "xxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "username"
}
]// no response body
// no response body
Authenticate users with FIDO
Authenticate users with FIDO
License must be authorized for community
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object represents authenticated user and public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}
Validation: 1. assertionResults {} is required
| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_fido' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"username": "string", "authModule": "string", "assertionResults": {}, "jwt": "jwt optional"}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_fido", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"username": "string",
"authModule": "string",
"assertionResults": {},
"jwt": "jwt optional"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_fido",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"username": "string",
"authModule": "string",
"assertionResults": {},
"jwt": "jwt optional"
}
},
)
print(res.json()){
"data": {
"status": "Ok",
"errorMessage": "",
"sub": "xxxxx",
"user": "{ \"username\" : \"xxxxx\"}",
"authenticatorId": "xxxxxx",
"authselection": "xxxxxx",
"proof_of_authentication_jwt": "xxxx.xxxx.xxxx"
},
"publicKey": "xxxxxxx",
"signature_token": "xxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "username"
}
]// no response body
// no response body
Authenticate users with ktoken
Authenticate users with ktoken
License must be authorized for community
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object represents authenticated user and public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}
Validation: 1. ktoken is required
| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_ktoken' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"ktoken": "g56hrstyj6i7je5jstbsr65jeh", "attributes": ["groups", "uid", "username"], "jwt": "jwt optional"}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_ktoken", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"ktoken": "g56hrstyj6i7je5jstbsr65jeh",
"attributes": [
"groups",
"uid",
"username"
],
"jwt": "jwt optional"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_ktoken",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"ktoken": "g56hrstyj6i7je5jstbsr65jeh",
"attributes": [
"groups",
"uid",
"username"
],
"jwt": "jwt optional"
}
},
)
print(res.json()){
"data": {
"user": {
"type": "basic",
"email_verified": true,
"disabled": false,
"username": "Username",
"status": "active",
"firstname": "Fname",
"middlename": "Mname",
"lastname": "Lname",
"email": "email@email.email",
"phone": "111111111",
"phone_verified": true,
"address": {
"house": "House",
"streetname": "Streetname",
"city": "City",
"country": "Country",
"zip": "Zip"
},
"address_verified": true,
"uid": "6cc4cc4e-eac9-478f-a871-976ff007ee29",
"dguid": "6cc4cc4e-eac9-478f-a871-976ff007ee29",
"tenantId": "607714223fc37d72a2422e86",
"communityId": "607714223fd37d72a2422e87",
"roleValue": "none"
},
"proof_of_authentication_jwt": "jwt"
},
"publicKey": "xxxxxxx",
"signature_token": "xxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "username"
}
]// no response body
// no response body
Authenticate users with LiveId [V2 CP]
Authenticate users with LiveId Selfie
License must be authorized for community
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object represents authenticated user and public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_liveid' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY' \ -H 'Content-Type: application/json' \ -d '"string"'
const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_liveid", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify("string")
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_liveid",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json="string",
)
print(res.json())"string"
[
{
"message": "This field should not be empty",
"param": "username"
}
]// no response body
// no response body
Authenticate users with UWL
Authenticate users with UWL
License must be authorized for community
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object represents authenticated user and public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}
Validation: 1. ktoken is required
| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_uwl' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"username": "string required", "authenticator_did": "string required", "authenticator_publickey": "string required", "nonce": "string required", "nonce_signature": "string required", "jwt": "jwt optional"}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_uwl", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"username": "string required",
"authenticator_did": "string required",
"authenticator_publickey": "string required",
"nonce": "string required",
"nonce_signature": "string required",
"jwt": "jwt optional"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticate_with_uwl",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"username": "string required",
"authenticator_did": "string required",
"authenticator_publickey": "string required",
"nonce": "string required",
"nonce_signature": "string required",
"jwt": "jwt optional"
}
},
)
print(res.json()){
"data": {
"user": {
"type": "basic",
"email_verified": true,
"disabled": false,
"username": "Username",
"status": "active",
"firstname": "Fname",
"middlename": "Mname",
"lastname": "Lname",
"email": "email@email.email",
"phone": "111111111",
"phone_verified": true,
"address": {
"house": "House",
"streetname": "Streetname",
"city": "City",
"country": "Country",
"zip": "Zip"
},
"address_verified": true,
"uid": "6cc4cc4e-eac9-478f-a871-976ff007ee29",
"dguid": "6cc4cc4e-eac9-478f-a871-976ff007ee29",
"tenantId": "607714223fc37d72a2422e86",
"communityId": "607714223fd37d72a2422e87",
"roleValue": "none"
},
"proof_of_authentication_jwt": "jwt"
},
"publicKey": "xxxxxxx",
"signature_token": "xxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "username"
}
]// no response body
// no response body
Authenticate users for Service Provider by OIDC SSO mechanism
Authenticate users
License must be of authLevel = system/service
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object represents oidc_token and other data to complete SSO and public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/oidc/sso' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"OIDCPayload": {"OIDCRequest": "xxxxxxxxxxxxx", "acr": "string optional"}, "userSession": {"pon_data": {}, "authenticator_data": {}, "user": {"uid": "xxxxxxxxxxxxx", "moduleId": "xxxxxxxxxxxxx"}, "jit": "xxxxxxxxxxxxx", "aal": "xxxxxxxxxxxxx", "wallet": {"publicKey": "xxxxxxxxxxxxx", "privateKey": "xxxxxxxxxxxxx", "id": "xxxxxxxxxxxxx"}}}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/oidc/sso", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"OIDCPayload": {
"OIDCRequest": "xxxxxxxxxxxxx",
"acr": "string optional"
},
"userSession": {
"pon_data": {},
"authenticator_data": {},
"user": {
"uid": "xxxxxxxxxxxxx",
"moduleId": "xxxxxxxxxxxxx"
},
"jit": "xxxxxxxxxxxxx",
"aal": "xxxxxxxxxxxxx",
"wallet": {
"publicKey": "xxxxxxxxxxxxx",
"privateKey": "xxxxxxxxxxxxx",
"id": "xxxxxxxxxxxxx"
}
}
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/oidc/sso",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"OIDCPayload": {
"OIDCRequest": "xxxxxxxxxxxxx",
"acr": "string optional"
},
"userSession": {
"pon_data": {},
"authenticator_data": {},
"user": {
"uid": "xxxxxxxxxxxxx",
"moduleId": "xxxxxxxxxxxxx"
},
"jit": "xxxxxxxxxxxxx",
"aal": "xxxxxxxxxxxxx",
"wallet": {
"publicKey": "xxxxxxxxxxxxx",
"privateKey": "xxxxxxxxxxxxx",
"id": "xxxxxxxxxxxxx"
}
}
}
},
)
print(res.json()){
"sid": "xxxxxxxxxxxxx",
"oidc_token": "xxxxxxxxxxxxx",
"oidc_url_response": "xxxxxxxxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "OIDCRequest"
}
]// no response body
// no response body
// no response body
// no response body
Gets jwt proof of authentication
Gets the proof of users authentication encoded in a jwt.
License must be authorized for community with authLevel = system, service, service_ext
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object represents authenticated user and public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| x-forwarded-for | string | client ip address that can be forwarded through n service layers |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}
Validation: 1. If ktoken is provided, then username, password, pin and otp are not allowed 2. If ktoken is not provided, then username is required 3. If ktoken is not provided, then at least one of password or otp or pin should be provided
| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/request/proof_of_authentication' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'x-forwarded-for: <value>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"user": {"username": "string required", "uid": "string optional", "moduleId": "string optional", "urn": "string optional"}, "methods": ["string required"], "ttl": 30}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/request/proof_of_authentication", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"x-forwarded-for": "<value>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"user": {
"username": "string required",
"uid": "string optional",
"moduleId": "string optional",
"urn": "string optional"
},
"methods": [
"string required"
],
"ttl": 30
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/request/proof_of_authentication",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"x-forwarded-for": "<value>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"user": {
"username": "string required",
"uid": "string optional",
"moduleId": "string optional",
"urn": "string optional"
},
"methods": [
"string required"
],
"ttl": 30
}
},
)
print(res.json()){
"proof_of_authentication": "jwt"
}[
{
"message": "This field should not be empty",
"param": "username"
}
]// no response body
// no response body
IDP-Initiated SAML SSO
Generate a SAML assertion without a prior SAMLRequest (unsolicited response).
The service provider must be of type saml with saml_config.idpInitiated: true. The SP's own saml_config is used for ACS URL, audience, signing, nameid, and attributes.
License must be of authLevel = system/service
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object with SAMLResponse, relayState, and SP info
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unencrypted data as well, it is only a preview available in Swagger
{
serviceProviderId: "string required - ID of the SAML service provider with idpInitiated: true",
idpInitConfig: "object optional":
{
relayState: "string optional - relay state to pass through"
},
userSession: "object required":
{
pon_data: "object required",
authenticator_data: "object required",
user: "object required":
{
uid: "string required",
moduleId: "string required"
},
wallet: {
publicKey: "string optional",
privateKey: "string optional",
id: "string optional"
},
aal: "string required"
}
}| Field | Type | Description |
|---|---|---|
| data | string | ECDSA encrypted request data |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/saml/idp-init' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "string"}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/saml/idp-init", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "string"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/saml/idp-init",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": "string"
},
)
print(res.json()){
"data": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"publicKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "SAMLRequest"
}
]// no response body
// no response body
// no response body
Authenticate users for Service Provider by SAML SSO mechanism
Authenticate users
License must be of authLevel = system/service
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object represents SAMLResponse and other data to complete SSO and public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
{
SAMLPayload: "object required":
{
SAMLRequest: "string required",
Signature: "string optional",
SigAlg: "string optional",
RelayState: "string optional",
},
userSession: "object required":
{
pon_data: "object required",
authenticator_data: "object required",
user: "object required":
{
uid: "string required"
},
wallet: {
publicKey: "string optional",
privateKey: "string optional",
id: "string optional",
}
}
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/saml/sso' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"SAMLPayload": {"SAMLRequest": "string", "Signature": "xxxxxxxxxxxxx", "RelayState": "xxxxxxxxxxxxx", "SigAlg": "xxxxxxxxxxxxx"}, "userSession": {"pon_data": {"key": "value"}, "authenticator_data": {"key": "value"}, "user": {"uid": "uid", "moduleId": "moduleId"}, "wallet": {"publicKey": "publicKey", "privateKey": "privateKey", "id": "id"}, "aal": "xxxxxxxxxxxxx"}}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/saml/sso", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"SAMLPayload": {
"SAMLRequest": "string",
"Signature": "xxxxxxxxxxxxx",
"RelayState": "xxxxxxxxxxxxx",
"SigAlg": "xxxxxxxxxxxxx"
},
"userSession": {
"pon_data": {
"key": "value"
},
"authenticator_data": {
"key": "value"
},
"user": {
"uid": "uid",
"moduleId": "moduleId"
},
"wallet": {
"publicKey": "publicKey",
"privateKey": "privateKey",
"id": "id"
},
"aal": "xxxxxxxxxxxxx"
}
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/saml/sso",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"SAMLPayload": {
"SAMLRequest": "string",
"Signature": "xxxxxxxxxxxxx",
"RelayState": "xxxxxxxxxxxxx",
"SigAlg": "xxxxxxxxxxxxx"
},
"userSession": {
"pon_data": {
"key": "value"
},
"authenticator_data": {
"key": "value"
},
"user": {
"uid": "uid",
"moduleId": "moduleId"
},
"wallet": {
"publicKey": "publicKey",
"privateKey": "privateKey",
"id": "id"
},
"aal": "xxxxxxxxxxxxx"
}
}
},
)
print(res.json()){
"data": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"publicKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "SAMLRequest"
}
]// no response body
// no response body
// no response body
Authenticate users for Service Provider by WSFED SSO mechanism
Authenticate users
License must be of authLevel = system/service
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object represents SAMLResponse and other data to complete SSO and public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
{
WSfedPayload: "object required":
{
wtrealm: "string required",
wa: "string required",
wreply: "string optional",
wctx: "string optional",
},
userSession: "object required":
{
pon_data: "object required",
authenticator_data: "object required",
user: "object required":
{
uid: "string required"
},
wallet: {
publicKey: "string optional",
privateKey: "string optional",
id: "string optional",
}
}
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/wsfed/sso' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"WSFedPayload": {"wtrealm": "string", "wa": "xxxxxxxxxxxxx", "wreply": "xxxxxxxxxxxxx", "wctx": "xxxxxxxxxxxxx"}, "userSession": {"pon_data": {"key": "value"}, "authenticator_data": {"key": "value"}, "user": {"uid": "uid", "moduleId": "moduleId"}, "wallet": {"publicKey": "publicKey", "privateKey": "privateKey", "id": "id"}, "aal": "xxxxxxxxxxxxx"}}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/wsfed/sso", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"WSFedPayload": {
"wtrealm": "string",
"wa": "xxxxxxxxxxxxx",
"wreply": "xxxxxxxxxxxxx",
"wctx": "xxxxxxxxxxxxx"
},
"userSession": {
"pon_data": {
"key": "value"
},
"authenticator_data": {
"key": "value"
},
"user": {
"uid": "uid",
"moduleId": "moduleId"
},
"wallet": {
"publicKey": "publicKey",
"privateKey": "privateKey",
"id": "id"
},
"aal": "xxxxxxxxxxxxx"
}
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/wsfed/sso",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"WSFedPayload": {
"wtrealm": "string",
"wa": "xxxxxxxxxxxxx",
"wreply": "xxxxxxxxxxxxx",
"wctx": "xxxxxxxxxxxxx"
},
"userSession": {
"pon_data": {
"key": "value"
},
"authenticator_data": {
"key": "value"
},
"user": {
"uid": "uid",
"moduleId": "moduleId"
},
"wallet": {
"publicKey": "publicKey",
"privateKey": "privateKey",
"id": "id"
},
"aal": "xxxxxxxxxxxxx"
}
}
},
)
print(res.json()){
"data": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"publicKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "SAMLRequest"
}
]// no response body
// no response body
// no response body
Identity Providers
Federate with upstream identity providers.
Fetch IDPs
Fetch IDPs
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing list of IDPs
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp/fetch' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"id": "id", "type": "oidc"}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp/fetch", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"id": "id",
"type": "oidc"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp/fetch",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"id": "id",
"type": "oidc"
}
},
)
print(res.json())[ "string" ]
[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Get IDP saml metadata
Get IDP saml metadata
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing IDP Metadata
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idpIdentifierrequired | string | Unique identifier of idp |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
{
ssoUrl: "string required",
sloUrl: "string required"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp/<idpIdentifier>/metadata' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"ssoUrl": "string", "sloUrl": "string"}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp/<idpIdentifier>/metadata", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"ssoUrl": "string",
"sloUrl": "string"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp/<idpIdentifier>/metadata",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"ssoUrl": "string",
"sloUrl": "string"
}
},
)
print(res.json()){
"data": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"publicKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
// no response body
Generate SAML Request
Generate SAML Request
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing generated saml request
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/samlRequest/generate' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"idpId": "uuid", "dns": "1k-dev.1kosmos.net"}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/samlRequest/generate", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"idpId": "uuid",
"dns": "1k-dev.1kosmos.net"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/samlRequest/generate",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"idpId": "uuid",
"dns": "1k-dev.1kosmos.net"
}
},
)
print(res.json()){
"SAMLRequest": "string",
"RedirectUrl": "www.google.com",
"RequestBinding": "string",
"ForceAuthn": true
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Create IDP
Create IDP
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing created IDP
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PUT 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"type": "oidc", "oidc_config": {"name": "name", "description": "description", "scopes": [{"name": "name", "display_name": "Display Name", "consent_required": true, "claims": [{"claim_name": null, "attribute_name": null, "attribute_type": null, "value_type": null, "value": null}]}]}}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"type": "oidc",
"oidc_config": {
"name": "name",
"description": "description",
"scopes": [
{
"name": "name",
"display_name": "Display Name",
"consent_required": true,
"claims": [
{
"claim_name": null,
"attribute_name": null,
"attribute_type": null,
"value_type": null,
"value": null
}
]
}
]
}
}
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"type": "oidc",
"oidc_config": {
"name": "name",
"description": "description",
"scopes": [
{
"name": "name",
"display_name": "Display Name",
"consent_required": true,
"claims": [
{
"claim_name": null,
"attribute_name": null,
"attribute_type": null,
"value_type": null,
"value": null
}
]
}
]
}
}
},
)
print(res.json())"string"
[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Update IDP
Update IDP
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing updated
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of idp |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp/<id>' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"oidc_config": {"name": "name", "description": "description", "scopes": [{"name": "name", "display_name": "Display Name", "consent_required": true, "claims": [{"claim_name": null, "attribute_name": null, "attribute_type": null, "value_type": null, "value": null}]}]}}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp/<id>", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"oidc_config": {
"name": "name",
"description": "description",
"scopes": [
{
"name": "name",
"display_name": "Display Name",
"consent_required": true,
"claims": [
{
"claim_name": null,
"attribute_name": null,
"attribute_type": null,
"value_type": null,
"value": null
}
]
}
]
}
}
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"oidc_config": {
"name": "name",
"description": "description",
"scopes": [
{
"name": "name",
"display_name": "Display Name",
"consent_required": true,
"claims": [
{
"claim_name": null,
"attribute_name": null,
"attribute_type": null,
"value_type": null,
"value": null
}
]
}
]
}
}
},
)
print(res.json())"string"
[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
// no response body
Delete IDP
Delete IDP
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns 204 No Content
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of idp |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X DELETE 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp/<id>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp/<id>", {
method: "DELETE",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
[
{
"message": "This field should not be empty",
"param": "tenantId"
}
]// no response body
Service Providers
Register the applications that consume authentication.
Get Service Provider by ID or entityId or client_id
Get Service Provider by ID or entityId. If service with given id will not be found, then API will try to find by saml_config.entityId
License must be of authLevel = system/service
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
id (required)
Id of MongoDB object or saml_config.entityId or oidc_config.client_id
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded service provider object
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of service provider or saml_config.entityId |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/<id>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/<id>", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"data": "string"
}[
{
"message": "This field should not be empty",
"param": "tenantId"
}
]// no response body
Get list of service providers
Get list of service providers
License must be of authLevel = system/service
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded array of service provider objects
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/fetch' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/fetch", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/fetch",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"data": [
{}
]
}[
{
"message": "This field should not be empty",
"param": "tenantId"
}
]// no response body
Create Service Provider
Create Service Provider
License must be of authLevel = system/service
Parameters
### tenantId (required) Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object represents created service provider and public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}
For type SAML: send only saml_config
For type OIDC: send only oidc_config
| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PUT 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "string"}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "string"
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": "string"
},
)
print(res.json()){
"data": "string"
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Create Service Provider for featured applications
Create Service Provider for featured applications
License must be of authLevel = system/service
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
type (required)
Supported types: auth0, okta, salesforce, forgerock, gsuite, zendesk
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object represents created service provider and public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| typerequired | string | Supported types - auth0, okta, salesforce, forgerock, gsuite, zendesk |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
{
"name": "string required",
"domain": "url required / for GSuite: string required",
"ssoUrl": "url required / for Zendesk: optional",
"config": "object required - see available configs below"
}
Configs:
For Auth0:
{
"clientId": "string required",
"clientSecret": "string required"
}
For Okta:
{
"apiToken": "string required"
}
For Forgerock:
{
"username": "string required",
"password": "string required",
"useExistingCOT": "boolean required",
"COT": "string optional if useExistingCOT === false",
"hostedSP": "string optional if useExistingCOT === true"
}
For Salesforce:
{
"username": "string required",
"password": "string required",
"securityToken": "string required"
}
For GSuite
{
"serviceAccountEmail": "string required",
"adminEmail": "string required",
"serviceAccountPrivateKey": "string required",
"sloUrl": "string required"
}
For Zendesk:
{}
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PUT 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/<type>' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"name": "string", "domain": "string", "ssoUrl": "https://1k-dev.1kosmos.net/newui/default/sso", "config": {}}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/<type>", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"name": "string",
"domain": "string",
"ssoUrl": "https://1k-dev.1kosmos.net/newui/default/sso",
"config": {}
}
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/<type>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"name": "string",
"domain": "string",
"ssoUrl": "https://1k-dev.1kosmos.net/newui/default/sso",
"config": {}
}
},
)
print(res.json()){
"data": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"publicKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Update Service Provider
Update Service Provider
License must be of authLevel = system/service
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
id (required)
Id of MongoDB object
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns ECDSA encoded object represents updated service provider and public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of service provider |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}
For type SAML: send only saml_config
For type OIDC: send only oidc_config
| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/<id>' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "string"}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/<id>", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "string"
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": "string"
},
)
print(res.json()){
"data": "string"
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
// no response body
Delete Service Provider
Delete Service Provider
License must be of authLevel = system/service
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
id (required)
Id of MongoDB object
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
204 No Content
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of service provider |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
{
"data": "<ecdsa_encrypted_data>"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X DELETE 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/<id>' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/<id>", {
method: "DELETE",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {}
})
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/serviceprovider/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {}
},
)
print(res.json())// no response body
[
{
"message": "This field should not be empty",
"param": "tenantId"
}
]// no response body
User Consent
User Consent endpoints.
Check user consents
Check user consents
License must be of authLevel = system, service, service_ext, app or app_ext
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than CaaS.environment.allowed_time_span from now
publickey (required)
Public key
Returns
Returns object with consents array
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body is unencrypted
| Field | Type | Description |
|---|---|---|
| userUrn | string | — |
| spId | string | — |
| scopeIds | array<string> | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent/check' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"userUrn": "xxxxxxxxxxxxx", "spId": "xxxxxxxxxxxxx", "scopeIds": ["xxxxxxxx"]}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent/check", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"userUrn": "xxxxxxxxxxxxx",
"spId": "xxxxxxxxxxxxx",
"scopeIds": [
"xxxxxxxx"
]
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent/check",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"userUrn": "xxxxxxxxxxxxx",
"spId": "xxxxxxxxxxxxx",
"scopeIds": [
"xxxxxxxx"
]
},
)
print(res.json()){
"consents": [
{
"version": "xxxxxxx",
"jurisdiction": "xxxxxxx",
"consentTimestamp": 123456789,
"collectionMethod": "xxxxxxx",
"consentReceiptID": "xxxxxxx",
"publicKey": "xxxxxxx",
"piiPrincipal": {
"urn": "xxxxxxx",
"username": "xxxxxxx",
"did": "xxxxxxx",
"publicKey": "xxxxxxx"
},
"piiProcessor": [
{
"tenantDns": "xxxxxxx",
"tenantId": "xxxxxxx",
"communityName": "xxxxxxx",
"communityId": "xxxxxxx"
}
],
"policyUrl": "xxxxxxx",
"scopes": [
{
"name": "xxxxxxx",
"uuid": "xxxxxxx",
"claims": [
"xxxxxxx"
],
"consentType": "xxxxxxx"
}
],
"requestID": "xxxxxxx",
"user_agent": "xxxxxxx",
"clientIP": "xxxxxxx",
"signature": "xxxxxxx",
"services": [
"string"
]
}
]
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
// no response body
Fetch user consents
Fetch user consents
License must be of authLevel = system, service, service_ext, app or app_ext
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than CaaS.environment.allowed_time_span from now
publickey (required)
Public key
Returns
Returns object with consents array
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body is unencrypted
| Field | Type | Description |
|---|---|---|
| userUrn | string | — |
| spId | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent/fetch' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"userUrn": "xxxxxxxxxxxxx", "spId": "xxxxxxxxxxxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent/fetch", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"userUrn": "xxxxxxxxxxxxx",
"spId": "xxxxxxxxxxxxx"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent/fetch",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"userUrn": "xxxxxxxxxxxxx",
"spId": "xxxxxxxxxxxxx"
},
)
print(res.json()){
"consents": [
{
"version": "xxxxxxx",
"jurisdiction": "xxxxxxx",
"consentTimestamp": 123456789,
"collectionMethod": "xxxxxxx",
"consentReceiptID": "xxxxxxx",
"publicKey": "xxxxxxx",
"piiPrincipal": {
"urn": "xxxxxxx",
"username": "xxxxxxx",
"did": "xxxxxxx",
"publicKey": "xxxxxxx"
},
"piiProcessor": [
{
"tenantDns": "xxxxxxx",
"tenantId": "xxxxxxx",
"communityName": "xxxxxxx",
"communityId": "xxxxxxx"
}
],
"policyUrl": "xxxxxxx",
"scopes": [
{
"name": "xxxxxxx",
"uuid": "xxxxxxx",
"claims": [
"xxxxxxx"
],
"consentType": "xxxxxxx"
}
],
"requestID": "xxxxxxx",
"user_agent": "xxxxxxx",
"clientIP": "xxxxxxx",
"signature": "xxxxxxx",
"services": [
"string"
]
}
]
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Fetch latest user consent by controller type and scope name
Fetch the latest consent record for a user filtered by controller type and scope name. Returns the most recent record sorted by updatedTs descending, or null if no match.
License must be of authLevel = system, service, service_ext, app or app_ext
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number)
publickey (required)
Public key
Returns
Returns object with consent (latest record or null)
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body is unencrypted
| Field | Type | Description |
|---|---|---|
| userUrnrequired | string | — |
| controllerTyperequired | string | — |
| scopeNamerequired | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent/fetch_by_scope' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"userUrn": "xxxxxxxxxxxxx", "controllerType": "xxxxxxxxxxxxx", "scopeName": "xxxxxxxxxxxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent/fetch_by_scope", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"userUrn": "xxxxxxxxxxxxx",
"controllerType": "xxxxxxxxxxxxx",
"scopeName": "xxxxxxxxxxxxx"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent/fetch_by_scope",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"userUrn": "xxxxxxxxxxxxx",
"controllerType": "xxxxxxxxxxxxx",
"scopeName": "xxxxxxxxxxxxx"
},
)
print(res.json()){
"consent": {}
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
// no response body
Create User Consent
Create User Consent
License must be of authLevel = system/service
Notice that creating new schema there are some conditions:
- You can't create second auth scheme with the same exact pair of 'tag' and 'communityId'
- Array with modules should have unique id for each module
- Each community can have only 1 auth scheme with 'isDefault === true', setting authScheme with 'isDefault === false' will reset the one that is default to not default.
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns created Auth Scheme
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| Field | Type | Description |
|---|---|---|
| version | string | — |
| uuid | string | — |
| transactionId | string | — |
| ts | number | — |
| method | string | — |
| authenticator | object | — |
| principal | object | — |
| controller | object | — |
| scopes | array<object> | — |
| request | object | — |
| signature | string | — |
| type | string | — |
| status | string | — |
| signedBy | string | — |
curl -X PUT 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"version": "BID-CR-v1.0.0", "uuid": "b208a1a7-a5f7-4e40-be00-fc9c5032853f", "transactionId": "b208a1a7-a5f7-4e40-be00-fc9c5032853f", "ts": 1661397718, "method": "web", "authenticator": {"name": "string", "id": "string", "version": "string", "os": "string"}, "principal": {"did": "string", "publicKey": "string", "urn": "<urn>", "username": "string"}, "controller": {"type": "sp", "name": "string", "id": "string", "entityId": "string"}, "scopes": [{"name": "xxxxxx", "uuid": "xxxxxx-xxxxx-xxxxxxx", "claims": ["firstname", "lastname", "..."]}], "request": {"uuid": "45b67275-8c23-4830-889e-89fc36a047f7", "clientIP": "string", "user_agent": "string"}, "signature": "string", "type": "explicit", "status": "granted", "signedBy": "user"}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"version": "BID-CR-v1.0.0",
"uuid": "b208a1a7-a5f7-4e40-be00-fc9c5032853f",
"transactionId": "b208a1a7-a5f7-4e40-be00-fc9c5032853f",
"ts": 1661397718,
"method": "web",
"authenticator": {
"name": "string",
"id": "string",
"version": "string",
"os": "string"
},
"principal": {
"did": "string",
"publicKey": "string",
"urn": "<urn>",
"username": "string"
},
"controller": {
"type": "sp",
"name": "string",
"id": "string",
"entityId": "string"
},
"scopes": [
{
"name": "xxxxxx",
"uuid": "xxxxxx-xxxxx-xxxxxxx",
"claims": [
"firstname",
"lastname",
"..."
]
}
],
"request": {
"uuid": "45b67275-8c23-4830-889e-89fc36a047f7",
"clientIP": "string",
"user_agent": "string"
},
"signature": "string",
"type": "explicit",
"status": "granted",
"signedBy": "user"
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"version": "BID-CR-v1.0.0",
"uuid": "b208a1a7-a5f7-4e40-be00-fc9c5032853f",
"transactionId": "b208a1a7-a5f7-4e40-be00-fc9c5032853f",
"ts": 1661397718,
"method": "web",
"authenticator": {
"name": "string",
"id": "string",
"version": "string",
"os": "string"
},
"principal": {
"did": "string",
"publicKey": "string",
"urn": "<urn>",
"username": "string"
},
"controller": {
"type": "sp",
"name": "string",
"id": "string",
"entityId": "string"
},
"scopes": [
{
"name": "xxxxxx",
"uuid": "xxxxxx-xxxxx-xxxxxxx",
"claims": [
"firstname",
"lastname",
"..."
]
}
],
"request": {
"uuid": "45b67275-8c23-4830-889e-89fc36a047f7",
"clientIP": "string",
"user_agent": "string"
},
"signature": "string",
"type": "explicit",
"status": "granted",
"signedBy": "user"
},
)
print(res.json()){
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "granted"
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
// no response body
// no response body
Revoke user consent
Revokes user consent by consent uuid
License must be of authLevel = system, service, service_ext, app or app_ext
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than CaaS.environment.allowed_time_span from now
publickey (required)
Public key
Returns
Returns uuid and consent status
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| uuidrequired | string | uuid of consent |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body is unencrypted
| Field | Type | Description |
|---|---|---|
| method | string | — |
| transactionId | string | — |
| authenticator | object | — |
| principal | object | — |
| signature | string | — |
| ts | number | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent/<uuid>/revoke' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"method": "web | mobile", "transactionId": "b208a1a7-a5f7-4e40-be00-fc9c5032853f", "authenticator": {"name": "xxxxxxx", "id": "xxxxxxx", "version": "xxxxxxx", "os": "xxxxxxx"}, "principal": {"did": "string", "publicKey": "string"}, "signature": "xxxxxxxx", "ts": 1661397718}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent/<uuid>/revoke", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"method": "web | mobile",
"transactionId": "b208a1a7-a5f7-4e40-be00-fc9c5032853f",
"authenticator": {
"name": "xxxxxxx",
"id": "xxxxxxx",
"version": "xxxxxxx",
"os": "xxxxxxx"
},
"principal": {
"did": "string",
"publicKey": "string"
},
"signature": "xxxxxxxx",
"ts": 1661397718
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/user_consent/<uuid>/revoke",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"method": "web | mobile",
"transactionId": "b208a1a7-a5f7-4e40-be00-fc9c5032853f",
"authenticator": {
"name": "xxxxxxx",
"id": "xxxxxxx",
"version": "xxxxxxx",
"os": "xxxxxxx"
},
"principal": {
"did": "string",
"publicKey": "string"
},
"signature": "xxxxxxxx",
"ts": 1661397718
},
)
print(res.json()){
"uuid": "xxxxxxxx",
"consentStatus": "xxxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Authentication Journey
Compose multi-step, policy-driven login journeys.
Fetch AuthenticationJourney
Fetch AuthenticationJourney
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing created IDP
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticationJourney/fetch' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"ids": ["xxxxxxxx"]}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticationJourney/fetch", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"ids": [
"xxxxxxxx"
]
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticationJourney/fetch",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"ids": [
"xxxxxxxx"
]
}
},
)
print(res.json()){
"id": "uuid",
"tenantId": "tenantId",
"communityId": "communityId",
"journeyName": "journeyName",
"enabled": true,
"groups": {
"value": [
"groups"
],
"operator": "overlap"
},
"deviceId": {
"value": [
"deviceId"
],
"operator": "overlap"
},
"application": {
"value": [
"Salesforce"
],
"operator": "in"
},
"username": {
"value": [
"username"
],
"operator": "in"
},
"ip": {
"value": [
"10.10.10.10"
],
"operator": "in_range"
},
"domain": {
"value": [
"1k-dev.com"
],
"operator": "in"
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
},
"mobileLocation": {
"value": 100,
"operator": "gt"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp"
]
}
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Create AuthenticationJourney
Create AuthenticationJourney
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing created IDP
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PUT 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticationJourney' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"name": "auth-journey-1", "enabled": true, "groups": {"value": ["group a", "group b"], "operator": "overlap"}, "deviceIds": {"value": ["device-id-1", "device-id-2"], "operator": "overlap"}, "applications": {"value": ["salesforce", "gsuite"], "operator": "in"}, "usernames": {"value": ["username_1", "username_2"], "operator": "in"}, "ip": {"value": "192.136.456.200-192.136.456.300", "operator": "in"}, "domain": {"value": ["google.com", "1kosmos.com"], "operator": "in"}, "decision": {"action": "mfa_required", "authenticationMethods": ["password_and_otp", "fido"]}, "machineNames": {"value": ["qa-win2016-0"], "operator": "in"}, "machineIds": {"value": ["B324123"], "operator": "in"}, "machineUsers": {"value": ["user@qa-win2016-0"], "operator": "in"}, "mobileLocation": {"value": 100, "operator": "gt"}}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticationJourney", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"name": "auth-journey-1",
"enabled": true,
"groups": {
"value": [
"group a",
"group b"
],
"operator": "overlap"
},
"deviceIds": {
"value": [
"device-id-1",
"device-id-2"
],
"operator": "overlap"
},
"applications": {
"value": [
"salesforce",
"gsuite"
],
"operator": "in"
},
"usernames": {
"value": [
"username_1",
"username_2"
],
"operator": "in"
},
"ip": {
"value": "192.136.456.200-192.136.456.300",
"operator": "in"
},
"domain": {
"value": [
"google.com",
"1kosmos.com"
],
"operator": "in"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp",
"fido"
]
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
},
"mobileLocation": {
"value": 100,
"operator": "gt"
}
}
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticationJourney",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"name": "auth-journey-1",
"enabled": true,
"groups": {
"value": [
"group a",
"group b"
],
"operator": "overlap"
},
"deviceIds": {
"value": [
"device-id-1",
"device-id-2"
],
"operator": "overlap"
},
"applications": {
"value": [
"salesforce",
"gsuite"
],
"operator": "in"
},
"usernames": {
"value": [
"username_1",
"username_2"
],
"operator": "in"
},
"ip": {
"value": "192.136.456.200-192.136.456.300",
"operator": "in"
},
"domain": {
"value": [
"google.com",
"1kosmos.com"
],
"operator": "in"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp",
"fido"
]
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
},
"mobileLocation": {
"value": 100,
"operator": "gt"
}
}
},
)
print(res.json()){
"data": {
"name": "auth-journey-1",
"enabled": true,
"groups": {
"value": [
"group a",
"group b"
],
"operator": "overlap"
},
"deviceIds": {
"value": [
"device-id-1",
"device-id-2"
],
"operator": "overlap"
},
"applications": {
"value": [
"salesforce",
"gsuite"
],
"operator": "in"
},
"usernames": {
"value": [
"username_1",
"username_2"
],
"operator": "in"
},
"ip": {
"value": "192.136.456.200-192.136.456.300",
"operator": "in"
},
"domain": {
"value": [
"google.com",
"1kosmos.com"
],
"operator": "in"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp",
"fido"
]
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
},
"mobileLocation": {
"value": 100,
"operator": "gt"
}
}
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Update AuthenticationJourney
Update AuthenticationJourney - this does a full delete and replace of all rules, then updates the authenticationJourney
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing created IDP
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of authenticationJourney |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticationJourney/<id>' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"name": "auth-journey-1", "enabled": true, "groups": {"value": ["group a", "group b"], "operator": "overlap"}, "deviceIds": {"value": ["device-id-1", "device-id-2"], "operator": "overlap"}, "applications": {"value": ["salesforce", "gsuite"], "operator": "in"}, "usernames": {"value": ["username_1", "username_2"], "operator": "in"}, "ip": {"value": "192.136.456.200-192.136.456.300", "operator": "in"}, "domain": {"value": ["google.com", "1kosmos.com"], "operator": "in"}, "decision": {"action": "mfa_required", "authenticationMethods": ["password_and_otp", "fido"]}, "machineNames": {"value": ["qa-win2016-0"], "operator": "in"}, "machineIds": {"value": ["B324123"], "operator": "in"}, "machineUsers": {"value": ["user@qa-win2016-0"], "operator": "in"}, "mobileLocation": {"value": 100, "operator": "gt"}}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticationJourney/<id>", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"name": "auth-journey-1",
"enabled": true,
"groups": {
"value": [
"group a",
"group b"
],
"operator": "overlap"
},
"deviceIds": {
"value": [
"device-id-1",
"device-id-2"
],
"operator": "overlap"
},
"applications": {
"value": [
"salesforce",
"gsuite"
],
"operator": "in"
},
"usernames": {
"value": [
"username_1",
"username_2"
],
"operator": "in"
},
"ip": {
"value": "192.136.456.200-192.136.456.300",
"operator": "in"
},
"domain": {
"value": [
"google.com",
"1kosmos.com"
],
"operator": "in"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp",
"fido"
]
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
},
"mobileLocation": {
"value": 100,
"operator": "gt"
}
}
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticationJourney/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"name": "auth-journey-1",
"enabled": true,
"groups": {
"value": [
"group a",
"group b"
],
"operator": "overlap"
},
"deviceIds": {
"value": [
"device-id-1",
"device-id-2"
],
"operator": "overlap"
},
"applications": {
"value": [
"salesforce",
"gsuite"
],
"operator": "in"
},
"usernames": {
"value": [
"username_1",
"username_2"
],
"operator": "in"
},
"ip": {
"value": "192.136.456.200-192.136.456.300",
"operator": "in"
},
"domain": {
"value": [
"google.com",
"1kosmos.com"
],
"operator": "in"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp",
"fido"
]
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
},
"mobileLocation": {
"value": 100,
"operator": "gt"
}
}
},
)
print(res.json()){
"data": {
"name": "auth-journey-1",
"enabled": true,
"groups": {
"value": [
"group a",
"group b"
],
"operator": "overlap"
},
"deviceIds": {
"value": [
"device-id-1",
"device-id-2"
],
"operator": "overlap"
},
"applications": {
"value": [
"salesforce",
"gsuite"
],
"operator": "in"
},
"usernames": {
"value": [
"username_1",
"username_2"
],
"operator": "in"
},
"ip": {
"value": "192.136.456.200-192.136.456.300",
"operator": "in"
},
"domain": {
"value": [
"google.com",
"1kosmos.com"
],
"operator": "in"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp",
"fido"
]
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
},
"mobileLocation": {
"value": 100,
"operator": "gt"
}
}
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Delete Authentication Journey
Delete Authentication Journey
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns 204 No Content
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of authenticationJourney |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X DELETE 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticationJourney/<id>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticationJourney/<id>", {
method: "DELETE",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/authenticationJourney/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
[
{
"message": "This field should not be empty",
"param": "tenantId"
}
]// no response body
Authentication Journey V 2
Authentication Journey V 2 endpoints.
Fetch AuthenticationJourneyV2
This Endpoint will fetch an authentication journey under the authenticationjourney_v2 collection by provided filters.
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing created IDP
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/authenticationJourney/fetch' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"ids": ["xxxxxxxx"], "requestingAppId": "adminx", "appConfigIds": ["123456", "22222"], "category": "adaptive_auth_fallback_policy_v2"}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/authenticationJourney/fetch", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"ids": [
"xxxxxxxx"
],
"requestingAppId": "adminx",
"appConfigIds": [
"123456",
"22222"
],
"category": "adaptive_auth_fallback_policy_v2"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/authenticationJourney/fetch",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"ids": [
"xxxxxxxx"
],
"requestingAppId": "adminx",
"appConfigIds": [
"123456",
"22222"
],
"category": "adaptive_auth_fallback_policy_v2"
}
},
)
print(res.json()){
"id": "uuid",
"tenantId": "tenantId",
"communityId": "communityId",
"journeyName": "journeyName",
"enabled": true,
"groups": {
"value": [
"groups"
],
"operator": "overlap"
},
"deviceId": {
"value": [
"deviceId"
],
"operator": "overlap"
},
"application": {
"value": [
"Salesforce"
],
"operator": "in"
},
"username": {
"value": [
"username"
],
"operator": "in"
},
"ip": {
"value": [
"10.10.10.10"
],
"operator": "in_range"
},
"domain": {
"value": [
"1k-dev.com"
],
"operator": "in"
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
},
"mobileLocation": {
"value": 100,
"operator": "gt"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp"
]
}
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Create V2 AuthenticationJourney
This Endpoint will create an authentication journey under the authenticationjourney_v2 collection, as well as rules for that authentication journey in rules engine.
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing created IDP
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PUT 'https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/authenticationJourney' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"name": "auth-journey-1", "enabled": true, "category": "adaptive_auth_fallback_policy_v2", "groups": {"value": ["group a", "group b"], "operator": "overlap"}, "deviceIds": {"value": ["device-id-1", "device-id-2"], "operator": "overlap"}, "requestingAppId": {"value": "adminx", "operator": "eq"}, "relyingAppId": {"value": "gsuite", "operator": "eq"}, "appConfigId": {"value": "124356656", "operator": "eq"}, "usernames": {"value": ["username_1", "username_2"], "operator": "in"}, "ip": {"value": "192.136.456.200-192.136.456.300", "operator": "in"}, "domain": {"value": ["google.com", "1kosmos.com"], "operator": "in"}, "decision": {"action": "mfa_required", "authenticationMethods": ["password_and_otp", "fido"]}, "machineNames": {"value": ["qa-win2016-0"], "operator": "in"}, "machineIds": {"value": ["B324123"], "operator": "in"}, "machineUsers": {"value": ["user@qa-win2016-0"], "operator": "in"}}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/authenticationJourney", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"name": "auth-journey-1",
"enabled": true,
"category": "adaptive_auth_fallback_policy_v2",
"groups": {
"value": [
"group a",
"group b"
],
"operator": "overlap"
},
"deviceIds": {
"value": [
"device-id-1",
"device-id-2"
],
"operator": "overlap"
},
"requestingAppId": {
"value": "adminx",
"operator": "eq"
},
"relyingAppId": {
"value": "gsuite",
"operator": "eq"
},
"appConfigId": {
"value": "124356656",
"operator": "eq"
},
"usernames": {
"value": [
"username_1",
"username_2"
],
"operator": "in"
},
"ip": {
"value": "192.136.456.200-192.136.456.300",
"operator": "in"
},
"domain": {
"value": [
"google.com",
"1kosmos.com"
],
"operator": "in"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp",
"fido"
]
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
}
}
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/authenticationJourney",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"name": "auth-journey-1",
"enabled": true,
"category": "adaptive_auth_fallback_policy_v2",
"groups": {
"value": [
"group a",
"group b"
],
"operator": "overlap"
},
"deviceIds": {
"value": [
"device-id-1",
"device-id-2"
],
"operator": "overlap"
},
"requestingAppId": {
"value": "adminx",
"operator": "eq"
},
"relyingAppId": {
"value": "gsuite",
"operator": "eq"
},
"appConfigId": {
"value": "124356656",
"operator": "eq"
},
"usernames": {
"value": [
"username_1",
"username_2"
],
"operator": "in"
},
"ip": {
"value": "192.136.456.200-192.136.456.300",
"operator": "in"
},
"domain": {
"value": [
"google.com",
"1kosmos.com"
],
"operator": "in"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp",
"fido"
]
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
}
}
},
)
print(res.json()){
"data": {
"name": "auth-journey-1",
"enabled": true,
"category": "adaptive_auth_fallback_policy_v2",
"groups": {
"value": [
"group a",
"group b"
],
"operator": "overlap"
},
"deviceIds": {
"value": [
"device-id-1",
"device-id-2"
],
"operator": "overlap"
},
"requestingAppId": {
"value": "adminx",
"operator": "eq"
},
"relyingAppId": {
"value": "gsuite",
"operator": "eq"
},
"appConfigId": {
"value": "124356656",
"operator": "eq"
},
"usernames": {
"value": [
"username_1",
"username_2"
],
"operator": "in"
},
"ip": {
"value": "192.136.456.200-192.136.456.300",
"operator": "in"
},
"domain": {
"value": [
"google.com",
"1kosmos.com"
],
"operator": "in"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp",
"fido"
]
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
}
}
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Update AuthenticationJourney V2
This Endpoint will updates an authentication journey under the authenticationjourney_v2 collection, as well as this does a full delete and replace of all related rules in rules engine.
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing created IDP
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of authenticationJourney |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
"data": "<ecdsa_encrypted_data>"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/authenticationJourney/<id>' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"name": "auth-journey-1", "enabled": true, "category": "adaptive_auth_fallback_policy_v2", "groups": {"value": ["group a", "group b"], "operator": "overlap"}, "deviceIds": {"value": ["device-id-1", "device-id-2"], "operator": "overlap"}, "requestingAppId": {"value": "adminx", "operator": "eq"}, "relyingAppId": {"value": "gsuite", "operator": "eq"}, "appConfigId": {"value": "124356656", "operator": "eq"}, "usernames": {"value": ["username_1", "username_2"], "operator": "in"}, "ip": {"value": "192.136.456.200-192.136.456.300", "operator": "in"}, "domain": {"value": ["google.com", "1kosmos.com"], "operator": "in"}, "decision": {"action": "mfa_required", "authenticationMethods": ["password_and_otp", "fido"]}, "machineNames": {"value": ["qa-win2016-0"], "operator": "in"}, "machineIds": {"value": ["B324123"], "operator": "in"}, "machineUsers": {"value": ["user@qa-win2016-0"], "operator": "in"}}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/authenticationJourney/<id>", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"name": "auth-journey-1",
"enabled": true,
"category": "adaptive_auth_fallback_policy_v2",
"groups": {
"value": [
"group a",
"group b"
],
"operator": "overlap"
},
"deviceIds": {
"value": [
"device-id-1",
"device-id-2"
],
"operator": "overlap"
},
"requestingAppId": {
"value": "adminx",
"operator": "eq"
},
"relyingAppId": {
"value": "gsuite",
"operator": "eq"
},
"appConfigId": {
"value": "124356656",
"operator": "eq"
},
"usernames": {
"value": [
"username_1",
"username_2"
],
"operator": "in"
},
"ip": {
"value": "192.136.456.200-192.136.456.300",
"operator": "in"
},
"domain": {
"value": [
"google.com",
"1kosmos.com"
],
"operator": "in"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp",
"fido"
]
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
}
}
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/authenticationJourney/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"name": "auth-journey-1",
"enabled": true,
"category": "adaptive_auth_fallback_policy_v2",
"groups": {
"value": [
"group a",
"group b"
],
"operator": "overlap"
},
"deviceIds": {
"value": [
"device-id-1",
"device-id-2"
],
"operator": "overlap"
},
"requestingAppId": {
"value": "adminx",
"operator": "eq"
},
"relyingAppId": {
"value": "gsuite",
"operator": "eq"
},
"appConfigId": {
"value": "124356656",
"operator": "eq"
},
"usernames": {
"value": [
"username_1",
"username_2"
],
"operator": "in"
},
"ip": {
"value": "192.136.456.200-192.136.456.300",
"operator": "in"
},
"domain": {
"value": [
"google.com",
"1kosmos.com"
],
"operator": "in"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp",
"fido"
]
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
}
}
},
)
print(res.json()){
"data": {
"name": "auth-journey-1",
"enabled": true,
"category": "adaptive_auth_fallback_policy_v2",
"groups": {
"value": [
"group a",
"group b"
],
"operator": "overlap"
},
"deviceIds": {
"value": [
"device-id-1",
"device-id-2"
],
"operator": "overlap"
},
"requestingAppId": {
"value": "adminx",
"operator": "eq"
},
"relyingAppId": {
"value": "gsuite",
"operator": "eq"
},
"appConfigId": {
"value": "124356656",
"operator": "eq"
},
"usernames": {
"value": [
"username_1",
"username_2"
],
"operator": "in"
},
"ip": {
"value": "192.136.456.200-192.136.456.300",
"operator": "in"
},
"domain": {
"value": [
"google.com",
"1kosmos.com"
],
"operator": "in"
},
"decision": {
"action": "mfa_required",
"authenticationMethods": [
"password_and_otp",
"fido"
]
},
"machineNames": {
"value": [
"qa-win2016-0"
],
"operator": "in"
},
"machineIds": {
"value": [
"B324123"
],
"operator": "in"
},
"machineUsers": {
"value": [
"user@qa-win2016-0"
],
"operator": "in"
}
}
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Delete V2 Authentication Journey
This Endpoint will deletes an authentication journey under the authenticationjourney_v2 collection by Id, as well as delete rules based on an authentication journey Ids from rules engine.
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns 204 No Content
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of authenticationJourney |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X DELETE 'https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/authenticationJourney/<id>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/authenticationJourney/<id>", {
method: "DELETE",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/authenticationJourney/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
[
{
"message": "This field should not be empty",
"param": "tenantId"
}
]// no response body
External Idp
External Idp endpoints.
Fetch ExternalIdp
Fetch ExternalIdp
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing created IDP
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
data: {
ids: [string, optional]
}
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/external_idp/fetch' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"ids": ["xxxxxxxx"]}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/external_idp/fetch", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"ids": [
"xxxxxxxx"
]
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/external_idp/fetch",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"ids": [
"xxxxxxxx"
]
}
},
)
print(res.json()){
"data": {
"connection": {
"idpName": "Okta",
"idpEntityId": "Okta",
"samlLoginUrl": "Okta",
"samlLogoutUrl": "Okta",
"ssoBinding": "Okta",
"sloBinding": "Okta",
"forceAuthn": true,
"spEntityId": "Okta",
"spSigningCertificate": "Okta",
"spPrivateKey": "Okta",
"idpSigningCertificate": "Okta"
},
"routingPolicy": {
"enabled": true,
"groups": {
"value": [
"group-a",
"group-b"
],
"operator": "overlap"
},
"usernames": {
"value": [
"user_a",
"user_b"
],
"operator": "overlap"
},
"usersInIdpStore": true
}
}
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Create ExternalIdp
Create ExternalIdp
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing created IDP
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
{
data: {
connection: {
idpName: "string, required",
idpEntityId: "string, required",
samlLoginUrl: "string, required",
samlLogoutUrl: "string, required",
ssoBinding: "string, required",
sloBinding: "string, required",
forceAuthn: "boolean, required",
spEntityId: "string, required",
spSigningCertificate: "string, required",
spPrivateKey: "string, required",
idpSigningCertificate: "string, required"
},
routingPolicy: { //optional object
enabled: "boolean, required",
groups: { //optional object
value: ["string, required"]
operator: "string, required (one of overlap, nooverlap)"
},
usernames: { //optional object
value: ["string, required"]
operator: "string, required (one of overlap, nooverlap)"
},
usersInIdpStore: "boolean, optional (defaults to false)"
},
}
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PUT 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/external_idp' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"connection": {"idpName": "Okta", "idpEntityId": "Okta", "samlLoginUrl": "Okta", "samlLogoutUrl": "Okta", "ssoBinding": "Okta", "sloBinding": "Okta", "forceAuthn": true, "spEntityId": "Okta", "spSigningCertificate": "Okta", "spPrivateKey": "Okta", "idpSigningCertificate": "Okta"}, "routingPolicy": {"enabled": true, "groups": {"value": ["group-a", "group-b"], "operator": "overlap"}, "usernames": {"value": ["user_a", "user_b"], "operator": "overlap"}, "usersInIdpStore": true}}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/external_idp", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"connection": {
"idpName": "Okta",
"idpEntityId": "Okta",
"samlLoginUrl": "Okta",
"samlLogoutUrl": "Okta",
"ssoBinding": "Okta",
"sloBinding": "Okta",
"forceAuthn": true,
"spEntityId": "Okta",
"spSigningCertificate": "Okta",
"spPrivateKey": "Okta",
"idpSigningCertificate": "Okta"
},
"routingPolicy": {
"enabled": true,
"groups": {
"value": [
"group-a",
"group-b"
],
"operator": "overlap"
},
"usernames": {
"value": [
"user_a",
"user_b"
],
"operator": "overlap"
},
"usersInIdpStore": true
}
}
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/external_idp",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"connection": {
"idpName": "Okta",
"idpEntityId": "Okta",
"samlLoginUrl": "Okta",
"samlLogoutUrl": "Okta",
"ssoBinding": "Okta",
"sloBinding": "Okta",
"forceAuthn": true,
"spEntityId": "Okta",
"spSigningCertificate": "Okta",
"spPrivateKey": "Okta",
"idpSigningCertificate": "Okta"
},
"routingPolicy": {
"enabled": true,
"groups": {
"value": [
"group-a",
"group-b"
],
"operator": "overlap"
},
"usernames": {
"value": [
"user_a",
"user_b"
],
"operator": "overlap"
},
"usersInIdpStore": true
}
}
},
)
print(res.json()){
"data": {
"connection": {
"idpName": "Okta",
"idpEntityId": "Okta",
"samlLoginUrl": "Okta",
"samlLogoutUrl": "Okta",
"ssoBinding": "Okta",
"sloBinding": "Okta",
"forceAuthn": true,
"spEntityId": "Okta",
"spSigningCertificate": "Okta",
"spPrivateKey": "Okta",
"idpSigningCertificate": "Okta"
},
"routingPolicy": {
"enabled": true,
"groups": {
"value": [
"group-a",
"group-b"
],
"operator": "overlap"
},
"usernames": {
"value": [
"user_a",
"user_b"
],
"operator": "overlap"
},
"usersInIdpStore": true
}
}
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Update ExternalIdp, does a replacement of the external idp config with the provided data
Update ExternalIdp
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing created IDP
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of external idp |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
{
data: {
connection: { //required object
idpName: "string, required",
idpEntityId: "string, required",
samlLoginUrl: "string, required",
samlLogoutUrl: "string, required",
ssoBinding: "string, required",
sloBinding: "string, required",
forceAuthn: "boolean, required",
spEntityId: "string, required",
spSigningCertificate: "string, required",
spPrivateKey: "string, required",
idpSigningCertificate: "string, required"
},
routingPolicy: { //optional object
enabled: "boolean, required",
groups: { //optional object
value: ["string, required"]
operator: "string, required (one of overlap, nooverlap)"
},
usernames: { //optional object
value: ["string, required"]
operator: "string, required (one of overlap, nooverlap)"
},
usersInIdpStore: "boolean, optional (defaults to false)"
},
}
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/external_idp/<id>' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"connection": {"idpName": "Okta", "idpEntityId": "Okta", "samlLoginUrl": "Okta", "samlLogoutUrl": "Okta", "ssoBinding": "Okta", "sloBinding": "Okta", "forceAuthn": true, "spEntityId": "Okta", "spSigningCertificate": "Okta", "spPrivateKey": "Okta", "idpSigningCertificate": "Okta"}, "routingPolicy": {"enabled": true, "groups": {"value": ["group-a", "group-b"], "operator": "overlap"}, "usernames": {"value": ["user_a", "user_b"], "operator": "overlap"}, "usersInIdpStore": true}}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/external_idp/<id>", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"connection": {
"idpName": "Okta",
"idpEntityId": "Okta",
"samlLoginUrl": "Okta",
"samlLogoutUrl": "Okta",
"ssoBinding": "Okta",
"sloBinding": "Okta",
"forceAuthn": true,
"spEntityId": "Okta",
"spSigningCertificate": "Okta",
"spPrivateKey": "Okta",
"idpSigningCertificate": "Okta"
},
"routingPolicy": {
"enabled": true,
"groups": {
"value": [
"group-a",
"group-b"
],
"operator": "overlap"
},
"usernames": {
"value": [
"user_a",
"user_b"
],
"operator": "overlap"
},
"usersInIdpStore": true
}
}
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/external_idp/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"connection": {
"idpName": "Okta",
"idpEntityId": "Okta",
"samlLoginUrl": "Okta",
"samlLogoutUrl": "Okta",
"ssoBinding": "Okta",
"sloBinding": "Okta",
"forceAuthn": true,
"spEntityId": "Okta",
"spSigningCertificate": "Okta",
"spPrivateKey": "Okta",
"idpSigningCertificate": "Okta"
},
"routingPolicy": {
"enabled": true,
"groups": {
"value": [
"group-a",
"group-b"
],
"operator": "overlap"
},
"usernames": {
"value": [
"user_a",
"user_b"
],
"operator": "overlap"
},
"usersInIdpStore": true
}
}
},
)
print(res.json()){
"data": {
"connection": {
"idpName": "Okta",
"idpEntityId": "Okta",
"samlLoginUrl": "Okta",
"samlLogoutUrl": "Okta",
"ssoBinding": "Okta",
"sloBinding": "Okta",
"forceAuthn": true,
"spEntityId": "Okta",
"spSigningCertificate": "Okta",
"spPrivateKey": "Okta",
"idpSigningCertificate": "Okta"
},
"routingPolicy": {
"enabled": true,
"groups": {
"value": [
"group-a",
"group-b"
],
"operator": "overlap"
},
"usernames": {
"value": [
"user_a",
"user_b"
],
"operator": "overlap"
},
"usersInIdpStore": true
}
}
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Delete external idp
Delete external idp
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns 204 No Content
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of external idp |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
In real application, you have to send encrypted data as follow:
{
data: {
username: string, optional,
ip: string, optional,
userAgent: string, optional
}
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X DELETE 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/external_idp/<id>' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"username": "xxxxxxxxxxxxx", "ip": "xxxxxxxxxxxxx", "userAgent": "xxxxxxxxxxxxx"}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/external_idp/<id>", {
method: "DELETE",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"username": "xxxxxxxxxxxxx",
"ip": "xxxxxxxxxxxxx",
"userAgent": "xxxxxxxxxxxxx"
}
})
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/external_idp/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"username": "xxxxxxxxxxxxx",
"ip": "xxxxxxxxxxxxx",
"userAgent": "xxxxxxxxxxxxx"
}
},
)
print(res.json())// no response body
[
{
"message": "This field should not be empty",
"param": "tenantId"
}
]// no response body
Schemes
Schemes endpoints.
Get Auth Schemes list
Get Auth Schemes list
License must be of authLevel = system/service
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Array of Auth Schemes
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| Field | Type | Description |
|---|---|---|
| default | boolean | — |
| fetchModules | boolean | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/scheme/fetch' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"default": true, "fetchModules": false}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/scheme/fetch", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"default": true,
"fetchModules": false
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/scheme/fetch",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"default": true,
"fetchModules": false
},
)
print(res.json())[
{}
][
{
"message": "This field should not be empty",
"param": "tenantId"
}
]// no response body
Create Auth Scheme
Create Auth Scheme
License must be of authLevel = system/service
Notice that creating new schema there are some conditions:
- You can't create second auth scheme with the same exact pair of 'tag' and 'communityId'
- Array with modules should have unique id for each module
- Each community can have only 1 auth scheme with 'isDefault === true', setting authScheme with 'isDefault === false' will reset the one that is default to not default.
Parameters
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns created Auth Scheme
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| Field | Type | Description |
|---|---|---|
| tag | string | — |
| enabled | boolean | — |
| isDefault | boolean | — |
| dbModule | object | — |
| modules | array<object> | — |
curl -X PUT 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/scheme' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"tag": "ExampleTag", "enabled": true, "isDefault": false, "dbModule": {"id": "id123456", "type": "Example type", "method": "Example type", "name": "Example name", "criteria": "required"}, "modules": [{}]}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/scheme", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"tag": "ExampleTag",
"enabled": true,
"isDefault": false,
"dbModule": {
"id": "id123456",
"type": "Example type",
"method": "Example type",
"name": "Example name",
"criteria": "required"
},
"modules": [
{}
]
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/scheme",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"tag": "ExampleTag",
"enabled": true,
"isDefault": false,
"dbModule": {
"id": "id123456",
"type": "Example type",
"method": "Example type",
"name": "Example name",
"criteria": "required"
},
"modules": [
{}
]
},
)
print(res.json()){
"_id": "6051d2a5ba947f531d5760e1",
"tag": "ExampleTag",
"communityId": "string",
"enabled": true,
"isDefault": false,
"dbModule": {
"id": "id123456",
"type": "Example type",
"method": "Example type",
"name": "Example name",
"criteria": "required"
},
"modules": [
{}
],
"__v": 0
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Update Auth Scheme
Update Auth Scheme
License must be of authLevel = system/service
Notice that updating new schema there are some conditions:
- You can't create second auth scheme with the same exact pair of 'tag' and 'communityId'
- Array with modules should have unique id for each module
- Each community can have only 1 auth scheme with 'isDefault === true', setting authScheme with 'isDefault === false' will reset the one that is default to not default.
IMPORTANT: Only full object can be updated
Parameters
id (required)
Id of MongoDB object
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns updated Auth Scheme
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of MongoDB object to update |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| Field | Type | Description |
|---|---|---|
| tag | string | — |
| enabled | boolean | — |
| isDefault | boolean | — |
| dbModule | object | — |
| modules | array<object> | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/scheme/<id>' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"tag": "ExampleTag", "enabled": true, "isDefault": false, "dbModule": {"id": "id123456", "type": "Example type", "method": "Example type", "name": "Example name", "criteria": "required"}, "modules": [{}]}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/scheme/<id>", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"tag": "ExampleTag",
"enabled": true,
"isDefault": false,
"dbModule": {
"id": "id123456",
"type": "Example type",
"method": "Example type",
"name": "Example name",
"criteria": "required"
},
"modules": [
{}
]
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/scheme/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"tag": "ExampleTag",
"enabled": true,
"isDefault": false,
"dbModule": {
"id": "id123456",
"type": "Example type",
"method": "Example type",
"name": "Example name",
"criteria": "required"
},
"modules": [
{}
]
},
)
print(res.json()){
"_id": "6051d2a5ba947f531d5760e1",
"tag": "ExampleTag",
"communityId": "string",
"enabled": true,
"isDefault": false,
"dbModule": {
"id": "id123456",
"type": "Example type",
"method": "Example type",
"name": "Example name",
"criteria": "required"
},
"modules": [
{}
],
"__v": 0
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Delete Auth Scheme
Delete Auth Scheme
Parameters
id (required)
Id of MongoDB object
tenantId (required)
Id of tenant
communityId (required)
Id of community
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
No content
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| idrequired | string | Id of MongoDB object to delete |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X DELETE 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/scheme/<id>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/scheme/<id>", {
method: "DELETE",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/scheme/<id>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
[
{
"message": "This field should not be empty",
"param": "tenantId"
}
]// no response body
Service Provider Catalog
Service Provider Catalog endpoints.
Get list of service provider catalog items
Returns object containing service provider catalog items
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object containing service provider catalog items
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/authn/spcatalog/list' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/spcatalog/list", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/authn/spcatalog/list",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"spCatalogItemOne": {
"name": "spCatalogItemOne",
"logo": "logo1",
"template": "template1",
"sso_url": "http://sso1.test",
"type": "salesforce",
"description": "string"
},
"spCatalogItemTwo": {
"name": "spCatalogItemTwo",
"logo": "logo2",
"template": "template2",
"sso_url": "http://sso2.test",
"type": "salesforce",
"description": "string"
}
}// no response body
// no response body
Create or update Service Provider Catalog item
Create or update Service Provider Catalog item
License must any but valid
Request Body
name (required)
Name of this SP Catalog item
logo (required)
Logo of SP Catalog item
sso_url (required)
SSO using during Single Sign On process
template (require)
Template
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object represents created or updated catalog item
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| Field | Type | Description |
|---|---|---|
| name | string | — |
| logo | string | — |
| sso_url | string | — |
| template | string | — |
| type | string | — |
| description | string | — |
curl -X PUT 'https://pilot-root.1kosmos.net/authn/spcatalog/item' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"name": "spCatalogItemOne", "logo": "logo", "sso_url": "http://sso.test", "template": "template", "type": "salesforce", "description": "string"}'const res = await fetch("https://pilot-root.1kosmos.net/authn/spcatalog/item", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "spCatalogItemOne",
"logo": "logo",
"sso_url": "http://sso.test",
"template": "template",
"type": "salesforce",
"description": "string"
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/authn/spcatalog/item",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"name": "spCatalogItemOne",
"logo": "logo",
"sso_url": "http://sso.test",
"template": "template",
"type": "salesforce",
"description": "string"
},
)
print(res.json()){
"sp_catalog.spCatalogItemOne": {
"name": "spCatalogItemOne",
"logo": "logo",
"sso_url": "http://sso.test",
"template": "template",
"type": "salesforce",
"description": "string"
}
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Delete Service Provider Catalog item
Delete Service Provider Catalog item
License must be of authLevel = system/service
Parameters
name (required)
Name of deleting item
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
204 No Content
| Name | Type | Description |
|---|---|---|
| namerequired | string | Name of service provider item |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X DELETE 'https://pilot-root.1kosmos.net/authn/spcatalog/item/<name>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/spcatalog/item/<name>", {
method: "DELETE",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/authn/spcatalog/item/<name>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Auth Policy V 2
Auth Policy V 2 endpoints.
Evaluate adaptive authentication policy and returning schemes
Fetch auth schemes after evaluating facts against adaptive authentication policies
License must be a valid license authorized for the community
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns decision from rules evaluation. Possible decisions are "mfa_needed", "grant_access", "deny_access".
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| Field | Type | Description |
|---|---|---|
| facts | object | — |
| enforceFallbackPolicy | boolean | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/auth_policy/auth_schemes' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"facts": {"groups": ["groupA", "groupB"], "requestingAppId": "adminx", "appConfigId": "123-546-7868-3454"}, "enforceFallbackPolicy": true}'const res = await fetch("https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/auth_policy/auth_schemes", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"facts": {
"groups": [
"groupA",
"groupB"
],
"requestingAppId": "adminx",
"appConfigId": "123-546-7868-3454"
},
"enforceFallbackPolicy": true
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/auth_policy/auth_schemes",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"facts": {
"groups": [
"groupA",
"groupB"
],
"requestingAppId": "adminx",
"appConfigId": "123-546-7868-3454"
},
"enforceFallbackPolicy": true
},
)
print(res.json()){
"schemes": [
{
"factors": [
"password"
],
"authenticationJourneyV2Id": "13435667",
"result": "grant_access"
}
]
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Evaluate adaptive authentication policy
Fetch decision after evaluating facts against adaptive authentication policy
License must be a valid license authorized for the community
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns decision from rules evaluation. Possible decisions are "mfa_needed", "grant_access", "deny_access".
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| Field | Type | Description |
|---|---|---|
| facts | object | — |
| enforceFallbackPolicy | boolean | — |
| jwt | string | — |
| type | string | Optional type parameter. Set to "fallback" to request fallback authentication journey. |
curl -X POST 'https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/auth_policy/evaluate' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"facts": {"groups": ["groupA", "groupB"], "requestingAppId": "adminx", "IP": "10.0.0.7", "machine_domain": "someDomain.com", "username": "userA", "deviceId": "someDomain.com", "machine_name": "userA", "machine_id": "B324123", "machine_user": "someDomain.com", "authenticationMethods": ["password", "otp"]}, "enforceFallbackPolicy": true, "jwt": "jwt optional", "type": "fallback"}'const res = await fetch("https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/auth_policy/evaluate", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"facts": {
"groups": [
"groupA",
"groupB"
],
"requestingAppId": "adminx",
"IP": "10.0.0.7",
"machine_domain": "someDomain.com",
"username": "userA",
"deviceId": "someDomain.com",
"machine_name": "userA",
"machine_id": "B324123",
"machine_user": "someDomain.com",
"authenticationMethods": [
"password",
"otp"
]
},
"enforceFallbackPolicy": true,
"jwt": "jwt optional",
"type": "fallback"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/v2/tenant/<tenantId>/community/<communityId>/auth_policy/evaluate",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"facts": {
"groups": [
"groupA",
"groupB"
],
"requestingAppId": "adminx",
"IP": "10.0.0.7",
"machine_domain": "someDomain.com",
"username": "userA",
"deviceId": "someDomain.com",
"machine_name": "userA",
"machine_id": "B324123",
"machine_user": "someDomain.com",
"authenticationMethods": [
"password",
"otp"
]
},
"enforceFallbackPolicy": true,
"jwt": "jwt optional",
"type": "fallback"
},
)
print(res.json()){
"next": {
"step": "need_mfa",
"allowed_factors": [
"idp_redirect"
],
"idps": [
"idp-1"
]
},
"proof_of_authentication_jwt": "xxxxxx-xxxxx-xxxxxxx",
"signature_token": "xxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
IDP Config
IDP Config endpoints.
Get IDP Config
Fetch Indentity Provider's config
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data field containing IDP config
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp_config' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp_config", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp_config",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"data": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"publicKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
Set IDP Config
Create or update Indentity Provider's config
License must be of authLevel = system/service
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns object with public key and encrypted data containing IDP config
IMPORTANT: You can see unencrypted data, it is only a preview available in Swagger
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger
{
signingCert: "string required",
signingKey: "string required",
entityId: "string required",
authnRequestsSigned: "boolean required",
encryptionCert: "string required",
encryptionKey: "string required",
sso_bindings: ['string'],
slo_bindings: ['string'],
identifier: "string (required during update call)"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PUT 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp_config' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"signingCert": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "signingKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "encryptionCert": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "entityId": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "authnRequestsSigned": true, "encryptionKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "sso_bindings": ["string"], "slo_bindings": ["string"], "identifier": "string"}}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp_config", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"signingCert": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"signingKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"encryptionCert": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"entityId": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"authnRequestsSigned": true,
"encryptionKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"sso_bindings": [
"string"
],
"slo_bindings": [
"string"
],
"identifier": "string"
}
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/idp_config",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"data": {
"signingCert": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"signingKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"encryptionCert": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"entityId": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"authnRequestsSigned": true,
"encryptionKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"sso_bindings": [
"string"
],
"slo_bindings": [
"string"
],
"identifier": "string"
}
},
)
print(res.json()){
"data": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"publicKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
// no response body
JWT
JWT endpoints.
/jwt/verifyToken
Verify JWT Token.
Request Body
token (required)
Returns
Returns a decoded token value.
| Name | Type | Description |
|---|---|---|
| x-forwarded-for | string | client ip address that can be forwarded through n service layers |
| Field | Type | Description |
|---|---|---|
| token | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/jwt/verifyToken' \
-H 'x-forwarded-for: <value>' \
-H 'Content-Type: application/json' \
-d '{"token": "XXXXXX.yyyyy.zzzzzzzzzzzzzzz"}'const res = await fetch("https://pilot-root.1kosmos.net/authn/jwt/verifyToken", {
method: "POST",
headers: {
"x-forwarded-for": "<value>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"token": "XXXXXX.yyyyy.zzzzzzzzzzzzzzz"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/jwt/verifyToken",
headers={
"x-forwarded-for": "<value>"
},
json={
"token": "XXXXXX.yyyyy.zzzzzzzzzzzzzzz"
},
)
print(res.json())// no response body
// no response body
/v2/jwt/verifyToken
Verifies the JWT token and validates the caller's IP address.
Request Body
token (required)
Returns
Returns a decoded token value.
| Name | Type | Description |
|---|---|---|
| x-forwarded-for | string | client ip address that can be forwarded through n service layers |
| Field | Type | Description |
|---|---|---|
| token | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/v2/jwt/verifyToken' \
-H 'x-forwarded-for: <value>' \
-H 'Content-Type: application/json' \
-d '{"token": "XXXXXX.yyyyy.zzzzzzzzzzzzzzz"}'const res = await fetch("https://pilot-root.1kosmos.net/authn/v2/jwt/verifyToken", {
method: "POST",
headers: {
"x-forwarded-for": "<value>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"token": "XXXXXX.yyyyy.zzzzzzzzzzzzzzz"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/v2/jwt/verifyToken",
headers={
"x-forwarded-for": "<value>"
},
json={
"token": "XXXXXX.yyyyy.zzzzzzzzzzzzzzz"
},
)
print(res.json())// no response body
// no response body
Auth Policy
Auth Policy endpoints.
Evaluate adaptive authentication policy
Fetch decision after evaluating facts against adaptive authentication policy
License must be a valid license authorized for the community
Headers
licensekey (required)
License key encrypted with ECDSA - system or service level key is required
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now
publickey (required)
Public key
Returns
Returns decision from rules evaluation. Possible decisions are "mfa_needed", "grant_access", "deny_access".
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Id of tenant |
| communityIdrequired | string | Id of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 60 seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| Field | Type | Description |
|---|---|---|
| facts | object | — |
| enforceFallbackPolicy | boolean | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/auth_policy/evaluate' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"facts": {"groups": ["groupA", "groupB"], "applicationId": "application1", "IP": "10.0.0.7", "machine_domain": "someDomain.com", "username": "userA", "deviceId": "someDomain.com", "machine_name": "userA", "machine_id": "B324123", "machine_user": "someDomain.com", "authenticationMethods": ["password", "otp"]}, "enforceFallbackPolicy": true}'const res = await fetch("https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/auth_policy/evaluate", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"facts": {
"groups": [
"groupA",
"groupB"
],
"applicationId": "application1",
"IP": "10.0.0.7",
"machine_domain": "someDomain.com",
"username": "userA",
"deviceId": "someDomain.com",
"machine_name": "userA",
"machine_id": "B324123",
"machine_user": "someDomain.com",
"authenticationMethods": [
"password",
"otp"
]
},
"enforceFallbackPolicy": true
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/tenant/<tenantId>/community/<communityId>/auth_policy/evaluate",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"facts": {
"groups": [
"groupA",
"groupB"
],
"applicationId": "application1",
"IP": "10.0.0.7",
"machine_domain": "someDomain.com",
"username": "userA",
"deviceId": "someDomain.com",
"machine_name": "userA",
"machine_id": "B324123",
"machine_user": "someDomain.com",
"authenticationMethods": [
"password",
"otp"
]
},
"enforceFallbackPolicy": true
},
)
print(res.json()){
"next": {
"step": "need_mfa",
"allowed_factors": [
"idp_redirect"
],
"idps": [
"idp-1"
]
},
"proof_of_authentication_jwt": "xxxxxx-xxxxx-xxxxxxx",
"signature_token": "xxxxxxx"
}[
{
"message": "This field should not be empty",
"param": "name"
}
]// no response body
ECDSA Helper
ECDSA Helper endpoints.
Encrypt and decrypt the data string by public key and private key
Encrypt and decrypt the data string by public key and private key.
Parameters
method (optional)
The method parameter is type of enum. Default value is encrypt.
This parameter only accepts following values
encrypt, decrypt
Request Body
dataStr (required)
The dataStr key is type of string.
publicKey (required)
The publicKey is type of string.
privateKey (required)
The privateKey is type of string.
Returns
Returns the encrypted/decrypted string.
This API throw an error if something goes wrong. A common source of error is public or private key is not valid.
| Name | Type | Description |
|---|---|---|
| method | string | — |
| Field | Type | Description |
|---|---|---|
| dataStrrequired | string | Message to encrypt or decrypt |
| publicKeyrequired | string | — |
| privateKeyrequired | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/authn/ecdsa_helper/<method>' \
-H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
-H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
-H 'authLicense: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"dataStr": "Hey, This is example data string.", "publicKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "privateKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/authn/ecdsa_helper/<method>", {
method: "POST",
headers: {
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"dataStr": "Hey, This is example data string.",
"publicKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"privateKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/authn/ecdsa_helper/<method>",
headers={
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
},
json={
"dataStr": "Hey, This is example data string.",
"publicKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"privateKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
)
print(res.json()){
"data": "xxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxx"
}Environment
Environment endpoints.
/environment
Provide details regarding the environments.
Returns
Returns an environment object
curl -X GET 'https://pilot-root.1kosmos.net/authn/environment' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/environment", {
method: "GET",
headers: {
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/authn/environment",
headers={
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
Healthz
Healthz endpoints.
Get healthz.
Get healthz
Returns
Returns a healthz object
- ``
version = <git-tag>.<commit-id>.<dob>``
- ``
git-tag``: When code is compiled from a git-tag, this must carry the tag name. This should match one of the git tags.
- ``
commit-id``: This is the git-commit-id. eg: When code is built from this, the hex code, in the end, is the commit it.
- ``
dob``: Date Of Build. This is epoc-time-in-seconds that tell the time when the build was created.
- if the code is not built from a git-tag, then the ``
version =<commit-id>.<dob>``
curl -X GET 'https://pilot-root.1kosmos.net/authn/healthz' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/healthz", {
method: "GET",
headers: {
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/authn/healthz",
headers={
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"status": "all services operational",
"publicKey": "//same as <service>/publickeys endpoint",
"code": "200",
"version": "xxxx.xxxx.xxxx"
}Public Key
Public Key endpoints.
Get system's public key
Get system's public key. No authorization
Returns
Returns a public key object
curl -X GET 'https://pilot-root.1kosmos.net/authn/publickeys' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/publickeys", {
method: "GET",
headers: {
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/authn/publickeys",
headers={
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"publicKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}// no response body
Service Directory
Service Directory endpoints.
Get all service directories.
Get all service directories.
Returns
Returns all service directories.
curl -X GET 'https://pilot-root.1kosmos.net/authn/sd' \ -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \ -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \ -H 'authLicense: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/authn/sd", {
method: "GET",
headers: {
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/authn/sd",
headers={
"authMyPublicKey": "YOUR_PUBLIC_KEY",
"authMyPrivateKey": "YOUR_PRIVATE_KEY",
"authLicense": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"name1": "https://xxx.xxxxxx.xxx/xxxxx",
"name2": "https://xxx.xxxxxx.xxx/xxxxx",
"name3": "https://xxx.xxxxxx.xxx/xxxxx"
}