Hanko SAML API
The SAML API from Hanko — 3 operation(s) for saml.
The SAML API from Hanko — 3 operation(s) for saml.
openapi: 3.0.3
info:
version: 1.2.0
title: Hanko Admin Audit Logs SAML API
description: '## Introduction
This is the OpenAPI specification for the [Hanko Admin API](https://github.com/teamhanko/hanko/blob/main/backend/README.md#start-private-api).
## Authentication
The Admin API must be protected by an access management system.
---
'
contact:
email: developers@hanko.io
license:
name: AGPL-3.0-or-later
url: https://www.gnu.org/licenses/agpl-3.0.txt
servers:
- url: https://{tenant_id}.hanko.io/admin
variables:
tenant_id:
default: ''
description: The (UU)ID of a tenant. Replace the default value with your tenant ID.
tags:
- name: SAML
paths:
/saml/provider:
get:
deprecated: true
summary: Get a SAML provider
description: Get a SAML service provider config for a provided domain.
operationId: get-saml-provider
tags:
- SAML
parameters:
- name: domain
in: query
description: Fully qualified domain name for which a SAML service provider is registered
required: true
schema:
type: string
format: hostname
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
enabled:
type: boolean
readOnly: true
default: true
name:
type: string
readOnly: true
example: MySamlProvier
domain:
type: string
format: hostname
readOnly: true
example: text.example
metadata_url:
type: string
format: uri
readOnly: true
example: http://idp-metadata.url
skip_email_verification:
type: boolean
readOnly: true
default: false
attribute_map:
type: object
additionalProperties: false
properties:
name:
type: string
family_name:
type: string
given_name:
type: string
middle_name:
type: string
nickname:
type: string
preferred_username:
type: string
profile:
type: string
picture:
type: string
website:
type: string
gender:
type: string
birthdate:
type: string
zone_info:
type: string
locale:
type: string
updated_at:
type: string
email:
type: string
email_verified:
type: string
phone:
type: string
phone_verified:
type: string
'400':
$ref: '#/components/responses/BadRequest'
'404':
description: Not Found
/saml/metadata:
get:
summary: Get SAML Metadata
description: Download SAML service provider metadata or public certificate.
operationId: get-saml-metadata
tags:
- SAML
parameters:
- name: domain
in: query
description: Fully qualified domain name to which a SAML service provider is registered
required: true
schema:
type: string
- name: cert_only
in: query
description: Toggle to download the SAML service provider public certificate
schema:
type: boolean
responses:
'200':
description: OK
content:
application/octet-stream:
schema:
type: string
format: binary
'400':
$ref: '#/components/responses/BadRequest'
'404':
description: Not found
/saml/callback:
post:
summary: SAML identity provider callback
description: Callback endpoint called by the identity provider after successful login.
operationId: post-saml-callback
tags:
- SAML
requestBody:
description: SAML Identity Provider Response
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
RelayState:
type: string
SAMLResponse:
type: string
responses:
'302':
description: Found
headers:
Set-Cookie:
schema:
type: string
description: Contains the JSON Web Token (JWT) that must be provided to protected endpoints.Cookie attributes (e.g. domain) can be set via [configuration](https://github.com/teamhanko/hanko/blob/main/backend/docs/Config.md#hanko-backend-config) option `session.cookie`.
X-Auth-Token:
schema:
type: string
description: Present only when enabled via [configuration](https://github.com/teamhanko/hanko/blob/main/backend/docs/Config.md#hanko-backend-config) option `session.enable_auth_token_header`for purposes of cross-domain communication between client and Hanko API.
'307':
description: Temporary Redirect
headers:
Location:
schema:
type: string
description: On error, redirect to the `saml.default_redirect_url` set in the backend-configuration. Error details are provided in the location URL in the form of `error` and `error_description`query params.
components:
responses:
BadRequest:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Bad Request
schemas:
Error:
type: object
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string
securitySchemes:
BearerApiKeyAuth:
description: Bearer authentication header of the form `Bearer <token>`, where `<token>` is your API key. Must only be used when using Hanko Cloud.
type: http
scheme: bearer
bearerFormat: API Key
externalDocs:
description: More about Hanko
url: https://github.com/teamhanko/hanko