|
| 1 | +{ |
| 2 | + "definitions": {}, |
| 3 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 4 | + "$id": "http://apicentre.paymentsnz.co.nz/schemas/authorization-code-request-schema.json", |
| 5 | + "type": "object", |
| 6 | + "title": "The schema for the Authorisation Request (OIDC/FAPI compliant) token", |
| 7 | + "additionalProperties": true, |
| 8 | + "required": [ |
| 9 | + "aud", |
| 10 | + "iss", |
| 11 | + "response_type", |
| 12 | + "response_mode", |
| 13 | + "client_id", |
| 14 | + "redirect_uri", |
| 15 | + "scope", |
| 16 | + "state", |
| 17 | + "nonce", |
| 18 | + "claims", |
| 19 | + "exp", |
| 20 | + "nbf", |
| 21 | + "code_challenge", |
| 22 | + "code_challenge_method" |
| 23 | + ], |
| 24 | + "properties": { |
| 25 | + "aud": { |
| 26 | + "title": "The audiences for the token", |
| 27 | + "description": "The value should be or include the API Provider Issuer Identifier URL", |
| 28 | + "oneOf": [ |
| 29 | + { |
| 30 | + "type": "string", |
| 31 | + "examples": ["https://api.alphanbank.com"], |
| 32 | + "format": "uri" |
| 33 | + }, |
| 34 | + { |
| 35 | + "type": "array", |
| 36 | + "items": { |
| 37 | + "type": "string", |
| 38 | + "pattern": "^(.+)$" |
| 39 | + }, |
| 40 | + "examples": ["https://api.alphanbank.com"] |
| 41 | + } |
| 42 | + ] |
| 43 | + }, |
| 44 | + "iat":{ |
| 45 | + "type": "integer", |
| 46 | + "description": "Time on which the Request Object was issued. May be used for determining age", |
| 47 | + "examples": [1496397168] |
| 48 | + }, |
| 49 | + "exp": { |
| 50 | + "type": "integer", |
| 51 | + "description": "Expiration time on or after which the Request Object MUST NOT be accepted for processing.", |
| 52 | + "examples": [1496397168] |
| 53 | + }, |
| 54 | + "nbf": { |
| 55 | + "type": "integer", |
| 56 | + "description": "Time before which the Request Object MUST NOT be accepted for processing.", |
| 57 | + "examples": [1496397168] |
| 58 | + }, |
| 59 | + "iss": { |
| 60 | + "type": "string", |
| 61 | + "title": "The Issuer of the token", |
| 62 | + "description": "The value should be the client ID of the third party, unless signed by a different party", |
| 63 | + "default": "", |
| 64 | + "examples": ["s6BhdRkqt3"], |
| 65 | + "pattern": "^(.+)$" |
| 66 | + }, |
| 67 | + "jti": { |
| 68 | + "type": "string", |
| 69 | + "title": "The unique identifier of the token", |
| 70 | + "description": "Used for determining token uniqueness. The value should be have sufficient entropy to make likelihood of collisions negligible.", |
| 71 | + "examples": ["d92f1393-752e-49c2-8ce3-90abc6b29655"] |
| 72 | + }, |
| 73 | + "response_type": { |
| 74 | + "type": "string", |
| 75 | + "title": "The type of the response token", |
| 76 | + "default": "code", |
| 77 | + "examples": ["code"], |
| 78 | + "enum": ["code"] |
| 79 | + }, |
| 80 | + "response_mode": { |
| 81 | + "type": "string", |
| 82 | + "title": "The mode used to deliver the response token", |
| 83 | + "default": "jwt", |
| 84 | + "examples": ["jwt"], |
| 85 | + "enum": ["jwt"] |
| 86 | + }, |
| 87 | + "client_id": { |
| 88 | + "type": "string", |
| 89 | + "title": "The ID of the third-party client", |
| 90 | + "default": "", |
| 91 | + "examples": ["s6BhdRkqt3"], |
| 92 | + "pattern": "^(.+)$" |
| 93 | + }, |
| 94 | + "redirect_uri": { |
| 95 | + "type": "string", |
| 96 | + "title": "The URI to which to redirect the customer User Agent after authorization", |
| 97 | + "default": "", |
| 98 | + "examples": ["https://api.mytpp.com/cb"], |
| 99 | + "format": "uri" |
| 100 | + }, |
| 101 | + "code_challenge": { |
| 102 | + "type": "string", |
| 103 | + "title": "The PKCE code challenge value", |
| 104 | + "examples": ["roXsvRC1K-5WAYWLWsqQJpXTR8NznFgysjjqKhqhSO4"], |
| 105 | + "pattern": "^[a-zA-Z0-9\\-_]*$" |
| 106 | + }, |
| 107 | + "code_challenge_method": { |
| 108 | + "type": "string", |
| 109 | + "title": "The mode used to deliver the response token", |
| 110 | + "examples": ["S256"], |
| 111 | + "default": "S256", |
| 112 | + "enum": ["S256"] |
| 113 | + }, |
| 114 | + "scope": { |
| 115 | + "type": "string", |
| 116 | + "title": "The OAuth scopes requested", |
| 117 | + "description": "Must include 'openid' and any other scopes required", |
| 118 | + "default": "openid", |
| 119 | + "examples": ["openid payments"], |
| 120 | + "pattern": "^openid([ ].*)*$" |
| 121 | + }, |
| 122 | + "state": { |
| 123 | + "type": "string", |
| 124 | + "title": "The third-party specific state", |
| 125 | + "description": "Opaque to API provider", |
| 126 | + "default": "", |
| 127 | + "examples": ["af0ifjsldkj"], |
| 128 | + "pattern": "^(.+)$" |
| 129 | + }, |
| 130 | + "nonce": { |
| 131 | + "type": "string", |
| 132 | + "title": "Third party nonce to avoid replay", |
| 133 | + "default": "", |
| 134 | + "examples": ["n-0S6_WzA2Mj"], |
| 135 | + "pattern": "^(.+)$" |
| 136 | + }, |
| 137 | + "max_age": { |
| 138 | + "type": "integer", |
| 139 | + "title": "Third-party specified maximum authentication age", |
| 140 | + "default": 0, |
| 141 | + "examples": [86400] |
| 142 | + }, |
| 143 | + "display": { |
| 144 | + "type": "string", |
| 145 | + "title": "Specify how to display authentication and consent to customer", |
| 146 | + "enum": ["page", "popup", "touch", "wap"] |
| 147 | + }, |
| 148 | + "prompt": { |
| 149 | + "type": "string", |
| 150 | + "title": "Specify whether the authorisation server should prompt for authentication and consent to customer", |
| 151 | + "examples": ["none", "login consent", "consent", "select_account"] |
| 152 | + }, |
| 153 | + "ui_locales": { |
| 154 | + "type": "string", |
| 155 | + "title": "Specify preferred languages to display authentication and consent to customer", |
| 156 | + "examples": ["en-nz", "mi", "en-nz mi"] |
| 157 | + }, |
| 158 | + "id_token_hint": { |
| 159 | + "type": "string", |
| 160 | + "description": "An ID token that was previously issued to the third party being replayed as a hint to the user identity" |
| 161 | + }, |
| 162 | + "claims_locales":{ |
| 163 | + "type": "string", |
| 164 | + "title": "Specify preferred languages to return claims to third party", |
| 165 | + "examples": ["en-nz", "mi", "en-nz mi"] |
| 166 | + }, |
| 167 | + "claims": { |
| 168 | + "type": "object", |
| 169 | + "title": "Claims object that holds the id_token request", |
| 170 | + "additionalProperties": true, |
| 171 | + "required": ["id_token"], |
| 172 | + "properties": { |
| 173 | + "id_token": { |
| 174 | + "type": "object", |
| 175 | + "title": "The ID token request claims", |
| 176 | + "additionalProperties": true, |
| 177 | + "required": ["ConsentId"], |
| 178 | + "properties": { |
| 179 | + "ConsentId": { |
| 180 | + "type": "object", |
| 181 | + "title": "The Consent ID object", |
| 182 | + "additionalProperties": false, |
| 183 | + "required": ["value", "essential"], |
| 184 | + "properties": { |
| 185 | + "value": { |
| 186 | + "type": "string", |
| 187 | + "title": "The value of Consent ID", |
| 188 | + "default": "", |
| 189 | + "examples": ["urn-alphabank-intent-58923"], |
| 190 | + "pattern": "^(.+)$" |
| 191 | + }, |
| 192 | + "essential": { |
| 193 | + "type": "boolean", |
| 194 | + "title": "Essential claim identifier", |
| 195 | + "default": false, |
| 196 | + "examples": [true] |
| 197 | + } |
| 198 | + } |
| 199 | + } |
| 200 | + } |
| 201 | + } |
| 202 | + } |
| 203 | + } |
| 204 | + } |
| 205 | +} |
0 commit comments