{
  "openapi": "3.0.4",
  "info": {
    "title": "AccessProvider",
    "version": "prod V1"
  },
  "paths": {
    "/Account/Logintypes": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "LoginTypes",
        "description": "Returns a list of allowed Logon types for the specific clientId and scope",
        "parameters": [
          {
            "name": "client_id",
            "in": "query",
            "description": "The ID received when signing up",
            "schema": {
              "type": "string"
            },
            "example": "f547eb20-7502-434a-98d7-a6d3b309ec0b"
          },
          {
            "name": "scope",
            "in": "query",
            "description": "Valid approved scope(s)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LoginTypesModel"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginTypesModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginTypesModel"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/Account/Login": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "GET: /Account/Login",
        "description": "Used to start Strong Customer Authentication (SCA)\r\n             \r\n            Supported eIDs\r\n            \r\n            Danish MitId\r\n            Swedish BankId\r\n            Norwegian BankId OIDC\r\n            Faroese Samleikin\r\n            MobileBankApp\r\n            \r\n            Response redirect query parameters:\r\n            \r\n            code                Authorization code        \r\n            state               The original state value from request if set\r\n            error               The error code\r\n            error_description   The errormessage for errors",
        "parameters": [
          {
            "name": "response_type",
            "in": "query",
            "description": "code",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "client_id",
            "in": "query",
            "description": "The ID received when signing up",
            "schema": {
              "type": "string"
            },
            "example": "897b48b2-3432-49b0-9e33-b90dc8b259cd"
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "description": "The redirect provided when signing up",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "description": "Valid approved scope(s)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "If set is returned with response redirect",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "login_type",
            "in": "query",
            "description": "The SCA ID/Name\r\n            \r\n            MitID\r\n            Swedish+BankId\r\n            Norwegian+Bankid+OIDC\r\n            Samleikin\r\n            MobileBankApp",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "device_id",
            "in": "query",
            "description": "The users device ID - if omitted user_agent is used",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code_challenge",
            "in": "query",
            "description": "Random client generated challenge for PKCE login",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code_challenge_method",
            "in": "query",
            "description": "Challenge encoding method (for PKCE)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "url_scheme",
            "in": "query",
            "description": "Universal link to use for app switch back to initialising app (if supported by eID app)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized"
          },
          "302": {
            "description": "Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/v2/par": {
      "post": {
        "tags": [
          "Oidc"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v2/authorize": {
      "get": {
        "tags": [
          "Oidc"
        ],
        "parameters": [
          {
            "name": "request_uri",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "urn:signatures:unique-id-54d52d44-edc6-45d6-9736-5d9f506118ec"
          },
          {
            "name": "SDCGuid",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "traceparent",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tracestate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v2/account/{requestType}/{requestId}/{requestAction}": {
      "get": {
        "tags": [
          "Psd2Sign"
        ],
        "summary": "Payment initiation",
        "description": "Payment initiation is used to retrieve a Signing URI (link) the PSU must uses to finalize a payment process\r\n            \r\n            There are four possible options:\r\n            \r\n            (pay)     For payment/agreement approval (PSU sign) and confirmation.\r\n                      Result: For processing the payment/agreement straight away after PSU approval (PSU sign)\r\n                      \r\n            (approve) For all paymentTypes except 'periodicpayment' - For payment approval (PSU sign) only.\r\n                      Result: For payment approved by the PSU. Payment gets set ready for confirmation.\r\n                      \r\n            (confirm) For all paymentTypes except 'periodicpayment' - executes the payment confirmation only (TPP only)\r\n                      Result: The payment is confirmed by the TPP and gets processed.\r\n                      Note: can only be made if the PSU already has approved the payment\r\n                      \r\n                      For paymentType 'periodicpayment' - agreement confirmation by PSU (PSU sign).\r\n                      Result: For agreement confirmation by the PSU.\r\n                      \r\n            (cancel)  For all paymentTypes except 'signingbasket' - For a payment/agreement cancellation (PSU sign).\r\n                      Result: For a payment/agreement cancellation by the PSU. A payment/agreement gets cancelled if not already processed.\r\n            \r\n             Result json (200):\r\n             {\r\n               \"signingUrl\": \"Unique onetime use signing URI\"\r\n             }\r\n             \r\n            For http 200 result redirect the PSU to the retrieved \"signingUrl\". Once the PSU has completed the SCA the\r\n            response is redirected to the TPP's clientID SigningRedirectUrl.\r\n            \r\n            Response redirect query parameters:\r\n            \r\n            result              The payment approval/cancel result (ok|error)\r\n            errorcode           Errorcode on error\r\n            errordescription    Short error description on error\r\n            requestid           The original request requestId (paymentId)\r\n            requestidtype       The original request requestType (payments|periodicpayment|signingbasket)\r\n            state               The original state value from request if set",
        "parameters": [
          {
            "name": "requestType",
            "in": "path",
            "description": "payments, periodicpayment and signingbasket",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "path",
            "description": "PaymentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestAction",
            "in": "path",
            "description": "pay, approve, confirm, cancel\r\n            \r\n            (pay)     For payment/agreement approval (PSU sign) and confirmation.   \r\n            \r\n            (approve) For all paymentTypes except 'periodicpayment' - For payment approval (PSU sign) only.\r\n            \r\n            (confirm) For all paymentTypes except 'periodicpayment' - executes the payment confirmation only (TPP only)\r\n                      For paymentType 'periodicpayment' - agreement confirmation by PSU (PSU sign).\r\n            \r\n            (cancel)  For all paymentTypes except 'signingbasket' - For a payment/agreement cancellation (PSU sign).\r\n            \r\n            *For \"periodicpayment\" only confirm and cancel is allowed.\r\n            *For \"signingbasket\" only pay, approve and confirm is allowed.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SigningRedirectUrl",
            "in": "header",
            "description": "The signing redirect provided when signing up",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "url_scheme",
            "in": "header",
            "description": "Universal link to use for app switch back to initialising app (if supported by eID app)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "If set is returned with response redirect",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitSignResponse"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "422": {
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/.well-known/openid-configuration/{issuer}": {
      "get": {
        "tags": [
          "RFC8414"
        ],
        "summary": "Get OpenID configuration",
        "parameters": [
          {
            "name": "issuer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/.well-known/jwk/{issuer}": {
      "get": {
        "tags": [
          "RFC8414"
        ],
        "summary": "Get OpenID key info",
        "parameters": [
          {
            "name": "issuer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/.well-known/revokedjwk/{issuer}": {
      "get": {
        "tags": [
          "RFC8414"
        ],
        "summary": "Get OpenID revoked key info (dummy)",
        "parameters": [
          {
            "name": "issuer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v2/.well-known/oauth-authorization-server": {
      "get": {
        "tags": [
          "RFC8414V2"
        ],
        "summary": "Get OAuth Authorization Server metadata for V2 issuer (RFC 8414).\r\nIssuer is derived from the host header.\r\nRoute: /v2/.well-known/oauth-authorization-server",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OasIssuerMetadataResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OasIssuerMetadataResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OasIssuerMetadataResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v2/.well-known/openid-configuration": {
      "get": {
        "tags": [
          "RFC8414V2"
        ],
        "summary": "Get OpenID Connect discovery document for V2 issuer.\r\nIssuer is derived from the host header.\r\nRoute: /v2/.well-known/openid-configuration",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OasIssuerMetadataResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OasIssuerMetadataResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OasIssuerMetadataResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v2/jwks": {
      "get": {
        "tags": [
          "RFC8414V2"
        ],
        "summary": "Get JSON Web Key Set (JWKS) for V2 issuer.\r\nIssuer is derived from the host header.\r\nRoute: /v2/jwks",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OasJwksResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OasJwksResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OasJwksResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v2/.well-known/oauth-authorization-server/{issuer}": {
      "get": {
        "tags": [
          "RFC8414V2"
        ],
        "summary": "Get OAuth Authorization Server metadata for a specific issuer (RFC 8414).\r\nRoute: /v2/.well-known/oauth-authorization-server/{issuer}",
        "parameters": [
          {
            "name": "issuer",
            "in": "path",
            "description": "The issuer identifier (e.g., \"idp.sdc.dk/v2\" or \"https://idp.sdc.dk/v2\").",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OasIssuerMetadataResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OasIssuerMetadataResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OasIssuerMetadataResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v2/.well-known/openid-configuration/{issuer}": {
      "get": {
        "tags": [
          "RFC8414V2"
        ],
        "summary": "Get OpenID Connect discovery document for a specific issuer.\r\nRoute: /v2/.well-known/openid-configuration/{issuer}",
        "parameters": [
          {
            "name": "issuer",
            "in": "path",
            "description": "The issuer identifier (e.g., \"idp.sdc.dk/v2\" or \"https://idp.sdc.dk/v2\").",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OasIssuerMetadataResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OasIssuerMetadataResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OasIssuerMetadataResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v2/jwks/{issuer}": {
      "get": {
        "tags": [
          "RFC8414V2"
        ],
        "summary": "Get JSON Web Key Set (JWKS) for a specific issuer.\r\nRoute: /v2/jwks/{issuer}",
        "parameters": [
          {
            "name": "issuer",
            "in": "path",
            "description": "The issuer identifier (e.g., \"idp.sdc.dk\" or \"https://idp.sdc.dk\").",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OasJwksResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OasJwksResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OasJwksResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/HttpValidationProblemDetails"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/Token": {
      "post": {
        "tags": [
          "TokenService"
        ],
        "summary": "Get a OAuth 2 Access Token and optionally a Refresh Token.",
        "description": " The token endpoint is used to \r\n - exchange an authorization code or a refresh token, to an access token and optionally a refresh token. \r\n - verify PinCode and get an access token and optionally a refresh token. \r\n - Token Exchange from SDC token to foreign token\r\n - Token Exchange from foreign token to SDC token\r\n \r\n There are 2 Mandatory Headers to call API Manager:\r\n- Content - Type = \"application / json; charset = utf - 8\"\r\n- Ocp-Apim-Subscription-Key = \"01234567890abcdef01234567890abcd -> Azure Developer Portal Subscription Key\"\r\n\r\n Examples:\r\n - for PinCode:\r\n{\r\n  \"grant_type\": \"urn:sdc:idp:grant-type:pin:v1\",\r\n  \"code\": \"xxxx\",\r\n  \"redirect_uri\": \"[redirect url]\",\r\n  \"client_id\": \"[client-Id]\",\r\n  \"scope\": \"[scope]\",\r\n  \"ssn\": \"[cpr]\",\r\n  \"ipidfr\": \"[ipidfr]\"\r\n}\r\n\r\n - for Token Exchange from SDC token to foreign token:\r\n {\r\n   \"grant_type\": \"urn:ietf:params:oauth:grant-type:token-exchange\",\r\n   \"subject_token\": \"[token]\",\r\n   \"subject_token_type\": \"urn:ietf:params:oauth:token-type:access_token\",\r\n   \"scope\": \"[scope]\",\r\n   \"client_id\": \"[client-Id]\",\r\n   \"audience\": \"[audience]\",\r\n   \"actor_token\": \"[actor token]\",\r\n   \"actor_token_type\": \"urn:sdc:params:oauth:token-type:json\" | \"urn:sdc:params:oauth:token-type:unsecure-jwt\"\r\n }\r\n \r\n - for Token Exchange from foreign token to SDC token\r\n - Please note that this is DEPRECATED.\r\n   New usages must use the /v2/token-endpoint.\r\n   See the following guides:\r\n     How-to: http://dok-con-t-c1-01:8090/x/OQLaCg\r\n     ”input” token spec: http://dok-con-t-c1-01:8090/display/IPS/SDC+Inbound+Token+-+jwt%3Ajwtb%3Apub%3Av1\r\n {\r\n   \"grant_type\": \"urn:ietf:params:oauth:grant-type:jwt-bearer\",\r\n   \"code\": \"[token]\",\r\n   \"scope\": \"[scope]\",\r\n   \"client_id\": \"[client-Id]\",\r\n  }\r\n  \r\n - for Token Exchange from foreign token to SDC token (with mapping)\r\n  {\r\n   \"grant_type\": \"urn:ietf:params:oauth:grant-type:jwt-bearer-2\",\r\n   \"code\": \"[token]\",\r\n   \"scope\": \"[scope]\",\r\n   \"client_id\": \"[client-Id]\",\r\n  }\r\n \r\n - for AuthorizationCode\r\n {\r\n    \"grant_type\": \"authorization_code\",\r\n    \"code\": \"[AuthorizationCode]\",\r\n    \"redirect_uri\": \"[redirect uri]\",\r\n    \"client_id\": \"[client-Id]\",\r\n    \"client_secret\": \"[client-Secret]\",\r\n    \"scope\": \"[scope]\",\r\n  }\r\n  \r\n - for refreshToken\r\n {\r\n    \"grant_type\": \"refresh_token\",\r\n    \"code\": \"[refreshToken]\",\r\n    \"scope\": \"[scope]\",\r\n    \"client_id\": \"[client-Id]\",\r\n    \"client_secret\": \"[client-Secret]\",\r\n    \"redirect_uri\": \"[scope]\"\r\n  }\r\n  \r\n - for client credentials\r\n {\r\n    \"grant_type\": \"client_credentials\",\r\n    \"scope\": \"[scope]\",\r\n    \"client_id\": \"[client-Id]\",\r\n    \"client_secret\": \"[client-Secret]\",\r\n  }",
        "parameters": [
          {
            "name": "x_request_id",
            "in": "header",
            "description": "SDCGuid: This will enable SDC to quickly search for error transactions when an error reports",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuth2ModelResponseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OAuth2ModelResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuth2ModelResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuth2ModelResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OAuth2ErrorModelResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuth2ErrorModelResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuth2ErrorModelResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/token": {
      "post": {
        "tags": [
          "TokenV2"
        ],
        "summary": "Implements 7523 OAuth and 8693 token exchange by calling the v2/token endpoint in the ParticipantManager.",
        "description": "\r\nSee [JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants (https://datatracker.ietf.org/doc/html/rfc7523)](https://datatracker.ietf.org/doc/html/rfc7523)\r\n            and [OAuth 2.0 Token Exchange (https://datatracker.ietf.org/doc/html/rfc8693)](https://datatracker.ietf.org/doc/html/rfc8693).\r\n\r\nAs the actual token exchange is performed in the ParticipantManager detailed errors will be logged by that.\r\n\r\nBoth 'application/json' and 'application/x-www-form-urlencoded' are accepted.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenExchangeRfc8693Response"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInfo"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInfo"
                }
              }
            }
          }
        }
      }
    },
    "/v2/userinfo": {
      "get": {
        "tags": [
          "UserInfo"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v3/userinfo": {
      "get": {
        "tags": [
          "UserInfo"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorInfo": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "nullable": true
          },
          "error_description": {
            "type": "string",
            "nullable": true
          },
          "error_uri": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "HttpValidationProblemDetails": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ProblemDetails"
          }
        ],
        "properties": {
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "InitSignResponse": {
        "type": "object",
        "properties": {
          "signingUrl": {
            "type": "string",
            "description": "SigningUrl - the complete signing URL to use to start the signing flow",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "InitSignResponse - response of signing initiation"
      },
      "LoginType": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "default": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "LoginTypesModel": {
        "type": "object",
        "properties": {
          "loginTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoginType"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OAuth2ErrorModelResponse": {
        "required": [
          "error",
          "error_description",
          "error_request_id"
        ],
        "type": "object",
        "properties": {
          "error": {
            "minLength": 1,
            "type": "string",
            "description": "\r\n  List of errorCode: \r\n \r\n                 -unknown_acr:              Invalid ACR value \r\n \r\n                 -unknown_clientid          Client not known in ParticipanManager \r\n \r\n                 -unknown_customer          Customer not present in Corebank \r\n \r\n                 -unknown_redirecturl       Redirect URL does not match client definition \r\n \r\n                 -unknown_responsetype      Invalid response type \r\n \r\n                 -unknown_token             Token not found \r\n \r\n                 -missing_consent           Missing user consent \r\n \r\n                 -missing_parameter         One or more values are missing in request \r\n \r\n                 -bad_clientid              ClientId is not well-formed \r\n \r\n                 -bad_country               Invalid Country Code \r\n \r\n                 -bad_customertype          Invalid Customer type \r\n \r\n                 -bad_redirecturl           Invalid redirect URL (not a valid https URI) \r\n \r\n                 -bad_responsetype          Invalid response type \r\n \r\n                 -bad_scope                 Invalid scope (not in list of valid scopes for client(s)) \r\n \r\n                 -bad_signingurl            Invalid signing redirect URL (not a valid https URI) \r\n \r\n                 -bad_tokentype             Invalid token type (not authorizationcode, refreshtoken or accesstoken) \r\n \r\n                 -invalid_pin               PIN code does not match \r\n \r\n                 -expired_pin               PIN code is expired \r\n \r\n                 -duplicate_pin             New PIN code must be different from current \r\n \r\n                 -unusable_pin              PIN code can not be used \r\n \r\n                 -agreement_notfound        No agreement found \r\n \r\n                 -pin_notfound              No PIN code found \r\n \r\n                 -illegal_token             Token was already used. \r\n \r\n                 -internal_error            Internal error in Participantmanager"
          },
          "error_description": {
            "minLength": 1,
            "type": "string",
            "description": "error description"
          },
          "error_uri": {
            "type": "string",
            "description": "error_uri",
            "nullable": true
          },
          "error_request_id": {
            "minLength": 1,
            "type": "string",
            "description": "request_id"
          }
        },
        "additionalProperties": false,
        "description": "OAuth 2 error"
      },
      "OAuth2ModelResponse": {
        "required": [
          "access_token"
        ],
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string",
            "description": "access_token"
          },
          "token_type": {
            "type": "string",
            "description": "token_type",
            "nullable": true
          },
          "issued_token_type": {
            "type": "string",
            "description": "token_type",
            "nullable": true
          },
          "expires_in": {
            "type": "string",
            "description": "expires_in",
            "nullable": true
          },
          "refresh_token": {
            "type": "string",
            "description": "refresh_token",
            "nullable": true
          },
          "scope": {
            "type": "string",
            "description": "scope",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "OAuth 2 request"
      },
      "OAuth2ModelResponseRequest": {
        "required": [
          "client_id",
          "grant_type",
          "scope"
        ],
        "type": "object",
        "properties": {
          "grant_type": {
            "minLength": 1,
            "type": "string",
            "description": "The standard OAuth 2 grant type parameter.\r\nExamples:\r\n- for PinCode: \"urn:sdc:idp:grant-type:pin:v1\"\r\n- for AuthorizationCode: \"authorization_code\"\r\n- for RefreshToken: \"refresh_token\"\r\n- for ExchangeToken: \"urn:ietf:params:oauth:grant-type:jwt-bearer\"\r\n and \"urn:ietf:params:oauth:grant-type:grant-type:token-exchange\""
          },
          "code": {
            "type": "string",
            "description": "- The pin-code associated with the ssn for the PinCode.\r\n- authorization_code\r\n- RefreshToken\r\n- Token",
            "nullable": true
          },
          "redirect_uri": {
            "type": "string",
            "description": "redirect_uri\r\nExample: \"https://www.sdc.dk\"",
            "nullable": true
          },
          "client_id": {
            "minLength": 1,
            "type": "string",
            "description": "The client id registered in the participant manager.\r\nExample: \"1d9a16c9-ded7-41e6-b26c-e4cf1c2f434c\""
          },
          "scope": {
            "minLength": 1,
            "type": "string",
            "description": "The standard OAuth2 scope parameter.\r\nExample: \"KidsApp\",\"Neos\",\"psd2.aisp\",\"nrp\""
          },
          "client_secret": {
            "type": "string",
            "description": "client_secret",
            "nullable": true
          },
          "code_verifier": {
            "type": "string",
            "description": "code_verifier",
            "nullable": true
          },
          "otp": {
            "type": "string",
            "description": "otp",
            "nullable": true
          },
          "ssn": {
            "type": "string",
            "description": "The social security number for the kid who is trying to logon- Using for PinCode.\r\nExample: \"1110104009\"",
            "nullable": true
          },
          "ipidfr": {
            "type": "string",
            "description": "Internal customer identifier. If SSN is provided this should be empty- Using for PinCode.",
            "nullable": true
          },
          "subject_token": {
            "type": "string",
            "description": "subject_token - Using for ExchangeToken from SDC to foreign",
            "nullable": true
          },
          "subject_token_type": {
            "type": "string",
            "description": "subject_tokenType - Using for ExchangeToken from SDC to foreign",
            "nullable": true
          },
          "audience": {
            "type": "string",
            "description": "audience - Using for ExchangeToken from SDC to foreign",
            "nullable": true
          },
          "actor_token": {
            "type": "string",
            "description": "actorToken - Using for ExchangeToken from SDC to foreign",
            "nullable": true
          },
          "actor_token_type": {
            "type": "string",
            "description": "type - Using for ExchangeToken from SDC to foreign",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "OAuth 2 error"
      },
      "OasIssuerMetadataResponse": {
        "type": "object",
        "properties": {
          "issuer": {
            "type": "string",
            "description": "The issuer identifier (e.g., \"https://idp.sdc.dk\" or \"https://idp.sdc.dk/v2\").",
            "nullable": true
          },
          "authorizationEndpoint": {
            "type": "string",
            "description": "URL of the authorization endpoint.",
            "nullable": true
          },
          "tokenEndpoint": {
            "type": "string",
            "description": "URL of the token endpoint.",
            "nullable": true
          },
          "jwksUri": {
            "type": "string",
            "description": "URL of the JSON Web Key Set (JWKS) document.",
            "nullable": true
          },
          "pushedAuthorizationRequestEndpoint": {
            "type": "string",
            "description": "URL of the pushed authorization request endpoint (PAR).",
            "nullable": true
          },
          "scopesSupported": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "JSON array of OAuth 2.0 scope strings supported (e.g., [\"psd2.aisp\", \"psd2.pisp\"]).",
            "nullable": true
          },
          "grantTypesSupported": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "JSON array of OAuth 2.0 grant type strings supported.",
            "nullable": true
          },
          "tokenEndpointAuthMethodsSupported": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "JSON array of client authentication methods supported by the token endpoint (e.g., [\"private_key_jwt\"]).",
            "nullable": true
          },
          "tokenEndpointAuthSigningAlgValuesSupported": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "JSON array of JWS signing algorithms supported for client authentication JWTs (e.g., [\"RS256\", \"PS256\"]).",
            "nullable": true
          },
          "responseTypesSupported": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "JSON array of OAuth 2.0 response type strings supported.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "OAuth Authorization Server (OAS) metadata response - matches ParticipantMgr API response format.\r\nProperties per IPS OAS Metadata Semantics specification."
      },
      "OasJwkEntry": {
        "type": "object",
        "properties": {
          "kty": {
            "type": "string",
            "description": "Key Type (e.g., \"RSA\", \"EC\").",
            "nullable": true
          },
          "use": {
            "type": "string",
            "description": "Public Key Use (e.g., \"sig\" for signature, \"enc\" for encryption).",
            "nullable": true
          },
          "alg": {
            "type": "string",
            "description": "Algorithm (e.g., \"RS256\", \"PS256\", \"ES256\").",
            "nullable": true
          },
          "kid": {
            "type": "string",
            "description": "Key ID.",
            "nullable": true
          },
          "n": {
            "type": "string",
            "description": "RSA modulus (Base64Url encoded).",
            "nullable": true
          },
          "e": {
            "type": "string",
            "description": "RSA public exponent (Base64Url encoded).",
            "nullable": true
          },
          "crv": {
            "type": "string",
            "description": "EC curve name (e.g., \"P-256\", \"P-384\", \"P-521\").",
            "nullable": true
          },
          "x": {
            "type": "string",
            "description": "EC X coordinate (Base64Url encoded).",
            "nullable": true
          },
          "y": {
            "type": "string",
            "description": "EC Y coordinate (Base64Url encoded).",
            "nullable": true
          },
          "x5c": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "X.509 certificate chain (array of Base64 encoded certificates).",
            "nullable": true
          },
          "x5t": {
            "type": "string",
            "description": "X.509 certificate SHA-1 thumbprint (Base64Url encoded).",
            "nullable": true
          },
          "x5t#S256": {
            "type": "string",
            "description": "X.509 certificate SHA-256 thumbprint (Base64Url encoded).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "JSON Web Key (JWK) entry per RFC 7517."
      },
      "OasJwksResponse": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OasJwkEntry"
            },
            "description": "Array of JSON Web Keys.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "JSON Web Key Set (JWKS) response per RFC 7517."
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "TokenExchangeRfc8693Response": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string",
            "nullable": true
          },
          "issued_token_type": {
            "type": "string",
            "nullable": true
          },
          "token_type": {
            "type": "string",
            "nullable": true
          },
          "expires_in": {
            "type": "integer",
            "format": "int32"
          },
          "scope": {
            "type": "string",
            "nullable": true
          },
          "refresh_token": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}