TokenOpenID

POST /{tenant}/tokensopenid

The TokensOpenID endpoint generates a login token based on an OpenID Connect token. The request expects the payload to contain a JSON object with a single property token. The value of token is a string containing the token itself:

{
    "token": "{token}"
}

The call is effectively the same as the POST /{tenant}/token request where the token is passed in the payload. The response is the same.

Example URI

POST /museum/tokensopenid

Headers

Content-Type: application/json
Prefer: representation=minimal

Response 201

{
    "id": "emu:/museum/tokens/65955134-39d7-4041-b4a3-b32aaec0d65c",
    "version": 1,
    "data": {
        "iat": 1620004860,
        "exp": 1620005760,
        "iss": {
            "id": "emu:/shared/tenants/museum",
            "@controls": {
                "self": {
                    "href": "http://swanston.melbourne.axiell.com:8084/shared/tenants/museum"
                }
            }
        },
        "sub": {
            "id": "emu:/museum/users/emu",
            "@controls": {
                "self": {
                    "href": "http://swanston.melbourne.axiell.com:8084/museum/users/emu"
                }
            }
        },
        "gid": {
            "id": "emu:/museum/roles/Admin",
            "@controls": {
                "self": {
                    "href": "http://swanston.melbourne.axiell.com:8084/museum/roles/Admin"
                }
            }
        },
        "jti": {
            "id": "emu:/museum/tokens/65955134-39d7-4041-b4a3-b32aaec0d65c",
            "@controls": {
                "self": {
                    "href": "http://swanston.melbourne.axiell.com:8084/museum/tokens/65955134-39d7-4041-b4a3-b32aaec0d65c"
                }
            }
        },
        "lid": "en_GB",
        "wfg": [
            "Admin"
        ]
    },
    "@namespaces": {
        "emu": {
            "name": "http://axiell.com/emu#"
        }
    },
    "@controls": {
        "self": {
            "href": "http://swanston.melbourne.axiell.com:8084/museum/tokens/65955134-39d7-4041-b4a3-b32aaec0d65c"
        },
        "start": {
            "method": "GET",
            "href": "http://swanston.melbourne.axiell.com:8084/"
        },
        "emu:create": {
            "method": "POST",
            "href": "http://swanston.melbourne.axiell.com:8084/museum/tokens",
            "isHrefTemplate": true,
            "encoding": "json",
            "schemaUrl": "http://swanston.melbourne.axiell.com:8084/museum/resources/tokens"
        },
        "search": {
            "method": "GET",
            "href": "http://swanston.melbourne.axiell.com:8084/museum/tokens"
        },
        "emu:update": {
            "method": "PATCH",
            "href": "http://swanston.melbourne.axiell.com:8084/museum/tokens/65955134-39d7-4041-b4a3-b32aaec0d65c",
            "encoding": "json",
            "schemaUrl": "http://json.schemastore.org/json-patch"
        },
        "emu:update-all": {
            "method": "PATCH",
            "href": "http://swanston.melbourne.axiell.com:8084/museum/tokens",
            "encoding": "json",
            "schemaUrl": "http://json.schemastore.org/json-patch"
        },
        "emu:delete": {
            "method": "DELETE",
            "href": "http://swanston.melbourne.axiell.com:8084/museum/tokens/65955134-39d7-4041-b4a3-b32aaec0d65c"
        },
        "emu:delete-all": {
            "method": "DELETE",
            "href": "http://swanston.melbourne.axiell.com:8084/museum/tokens"
        }
    }
}

Response Headers

Content-Type: application/vnd.mason+json; charset=UTF-8
Location: http://swanston.melbourne.axiell.com:8084/museum/tokens/d334ee4d-d4e2-4465-99f0-bbf1aa9bacc5
Authorization: Bearer {token}