Auth
13 operations under auth. Examples read $API and $KEY from your shell.
- GET /v1/auth/session
- POST /v1/auth/session/extend
- POST /v1/auth/logout
- POST /v1/auth/step-up/totp
- POST /v1/auth/step-up/webauthn/options
- POST /v1/auth/step-up/webauthn/verify
- POST /v1/auth/totp/login
- POST /v1/auth/totp/enrol
- POST /v1/auth/totp/confirm
- POST /v1/auth/webauthn/login/options
- POST /v1/auth/webauthn/login/verify
- POST /v1/auth/webauthn/register/options
- POST /v1/auth/webauthn/register/verify
GET /v1/auth/session
Responses
200 Default Response
object
session_idstring requireduser_idstring requiredorg_idstring requiredrolestring required one ofowner,admin,operator,viewer,approver,developer,issuer_operatoridle_expires_atstring requiredexpires_atstring requiredstep_up_expires_atstring required (nullable)
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/auth/session" \
-H "authorization: Bearer $KEY"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/auth/session");POST /v1/auth/session/extend
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Responses
200 Default Response
object
session_idstring requireduser_idstring requiredorg_idstring requiredrolestring required one ofowner,admin,operator,viewer,approver,developer,issuer_operatoridle_expires_atstring requiredexpires_atstring requiredstep_up_expires_atstring required (nullable)
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/auth/session/extend" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/auth/session/extend");POST /v1/auth/logout
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Responses
204 Default Response
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/auth/logout" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/auth/logout");POST /v1/auth/step-up/totp
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
object
codestring required
Responses
200 Default Response
object
step_up_expires_atstring required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/auth/step-up/totp" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{"code":"<code>"}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/auth/step-up/totp", {
body: {
"code": "<code>"
},
});POST /v1/auth/step-up/webauthn/options
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
object
Responses
200 Default Response
object
challenge_idstring requiredoptionsobject required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/auth/step-up/webauthn/options" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/auth/step-up/webauthn/options", {
body: {},
});POST /v1/auth/step-up/webauthn/verify
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
object
challenge_idstring requiredresponseobject requiredidstring requiredrawIdstring requiredtypestring required one ofpublic-keyresponseobject required
Responses
200 Default Response
object
step_up_expires_atstring required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/auth/step-up/webauthn/verify" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{"challenge_id":"<challenge_id>","response":{"id":"<id>","rawId":"<rawId>","type":"public-key","response":{}}}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/auth/step-up/webauthn/verify", {
body: {
"challenge_id": "<challenge_id>",
"response": {
"id": "<id>",
"rawId": "<rawId>",
"type": "public-key",
"response": {}
}
},
});POST /v1/auth/totp/login
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
object
emailstring requiredcodestring required
Responses
200 Default Response
object
user_idstring requiredorg_idstring required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/auth/totp/login" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{"email":"<email>","code":"<code>"}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/auth/totp/login", {
body: {
"email": "<email>",
"code": "<code>"
},
});POST /v1/auth/totp/enrol
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
object
enrolment_tokenstring required
Responses
200 Default Response
object
secretstring requiredotpauth_uristring required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/auth/totp/enrol" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{"enrolment_token":"<enrolment_token>"}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/auth/totp/enrol", {
body: {
"enrolment_token": "<enrolment_token>"
},
});POST /v1/auth/totp/confirm
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
object
enrolment_tokenstring requiredcodestring required
Responses
200 Default Response
object
user_idstring requiredorg_idstring required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/auth/totp/confirm" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{"enrolment_token":"<enrolment_token>","code":"<code>"}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/auth/totp/confirm", {
body: {
"enrolment_token": "<enrolment_token>",
"code": "<code>"
},
});POST /v1/auth/webauthn/login/options
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
object
Responses
200 Default Response
object
challenge_idstring requiredoptionsobject required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/auth/webauthn/login/options" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/auth/webauthn/login/options", {
body: {},
});POST /v1/auth/webauthn/login/verify
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
object
challenge_idstring requiredresponseobject requiredidstring requiredrawIdstring requiredtypestring required one ofpublic-keyresponseobject required
Responses
200 Default Response
object
user_idstring requiredorg_idstring required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/auth/webauthn/login/verify" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{"challenge_id":"<challenge_id>","response":{"id":"<id>","rawId":"<rawId>","type":"public-key","response":{}}}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/auth/webauthn/login/verify", {
body: {
"challenge_id": "<challenge_id>",
"response": {
"id": "<id>",
"rawId": "<rawId>",
"type": "public-key",
"response": {}
}
},
});POST /v1/auth/webauthn/register/options
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
object
enrolment_tokenstring optional
Responses
200 Default Response
object
challenge_idstring requiredoptionsobject required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/auth/webauthn/register/options" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/auth/webauthn/register/options", {
body: {},
});POST /v1/auth/webauthn/register/verify
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
object
challenge_idstring requiredresponseobject requiredidstring requiredrawIdstring requiredtypestring required one ofpublic-keyresponseobject required
enrolment_tokenstring optional
Responses
201 Default Response
object
credential_idstring required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/auth/webauthn/register/verify" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{"challenge_id":"<challenge_id>","response":{"id":"<id>","rawId":"<rawId>","type":"public-key","response":{}}}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/auth/webauthn/register/verify", {
body: {
"challenge_id": "<challenge_id>",
"response": {
"id": "<id>",
"rawId": "<rawId>",
"type": "public-key",
"response": {}
}
},
});