All files / test/schemas ProviderSchemaSpec.js

100% Statements 180/180
100% Branches 0/0
100% Functions 77/77
100% Lines 180/180
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683          1x 1x 1x         1x 1x         1x         1x 1x                 1x                   1x 1x     1x 1x     1x 1x             1x 1x     1x 1x     1x 1x               1x 1x     1x 1x     1x 1x                 1x 1x     1x 1x     1x 1x                                 1x 1x     1x 1x     1x 1x               1x 1x     1x 1x     1x 1x                     1x 1x                 1x 1x     1x 1x     1x 1x                     1x 1x                                   1x 1x     1x 1x           1x 1x                           1x 1x     1x 1x               1x 1x                         1x 1x               1x 1x     1x 1x     1x 1x         1x 1x                           1x 1x     1x 1x     1x 1x               1x 1x                             1x 1x     1x               1x 1x     1x               1x 1x     1x               1x 1x     1x               1x 1x     1x                     1x 1x     1x 1x                         1x 1x       1x                 1x 1x       1x                       1x 1x     1x 1x         1x 1x                                 1x 1x     1x 1x       1x 1x                   1x 1x     1x 1x                   1x 1x     1x 1x               1x 1x     1x 1x                   1x 1x 1x 1x                 1x 1x     1x             1x 1x     1x               1x 1x     1x 1x                 1x 1x     1x 1x                 1x 1x     1x 1x                   1x 1x     1x 1x                   1x 1x     1x 1x                   1x 1x     1x 1x                     1x 1x     1x 1x     1x 1x     1x 1x     1x 1x     1x 1x        
'use strict'
 
/**
 * Test dependencies
 */
const cwd = process.cwd()
const path = require('path')
const chai = require('chai')
 
/**
 * Assertions
 */
chai.should()
let expect = chai.expect
 
/**
 * Code under test
 */
const ProviderSchema = require(path.join(cwd, 'src', 'schemas', 'ProviderSchema'))
 
/**
 * Tests
 */
describe('OpenID Connect Provider Schema', () => {
  let {properties, required} = ProviderSchema
 
  /*
   *  3.  OpenID Provider Metadata
   *  http://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
   *
   *  OpenID Providers have metadata describing their configuration. These OpenID
   *  Provider Metadata values are used by OpenID Connect:
   */
  it('should be an instance of JSONSchema')
 
  /**
   *  issuer
   *    REQUIRED. URL using the https scheme with no query or fragment component
   *    that the OP asserts as its Issuer Identifier. If Issuer discovery is
   *    supported (see Section 2), this value MUST be identical to the issuer value
   *    returned by WebFinger. This also MUST be identical to the iss Claim value
   *    in ID Tokens issued from this Issuer.
   */
  it('should require "issuer"', () => {
    required.should.include('issuer')
  })
 
  it('should define type of "issuer"', () => {
    properties.issuer.type.should.equal('string')
  })
 
  it('should define format of "issuer"', () => {
    properties.issuer.format.should.equal('uri')
  })
 
  /**
   * authorization_endpoint
   *    REQUIRED. URL of the OP's OAuth 2.0 Authorization Endpoint [OpenID.Core].
   */
  it('should require "authorization_endpoint"', () => {
    required.should.include('authorization_endpoint')
  })
 
  it('should define type of "authorization_endpoint"', () => {
    properties.authorization_endpoint.type.should.equal('string')
  })
 
  it('should define format of "authorization_endpoint"', () => {
    properties.authorization_endpoint.format.should.equal('uri')
  })
 
  /**
   *  token_endpoint
   *    URL of the OP's OAuth 2.0 Token Endpoint [OpenID.Core]. This is REQUIRED
   *    unless only the Implicit Flow is used.
   */
  it('should require "token_endpoint"', () => {
    required.should.include('token_endpoint')
  })
 
  it('should define type of "token_endpoint"', () => {
    properties.token_endpoint.type.should.equal('string')
  })
 
  it('should define format of "token_endpoint"', () => {
    properties.token_endpoint.format.should.equal('uri')
  })
 
  /**
   *  userinfo_endpoint
   *    RECOMMENDED. URL of the OP's UserInfo Endpoint [OpenID.Core]. This URL MUST
   *    use the https scheme and MAY contain port, path, and query parameter
   *    components.
   */
  it('should require "userinfo_endpoint"', () => {
    required.should.include('userinfo_endpoint')
  })
 
  it('should define type of "userinfo_endpoint"', () => {
    properties.userinfo_endpoint.type.should.equal('string')
  })
 
  it('should define format of "userinfo_endpoint"', () => {
    properties.userinfo_endpoint.format.should.equal('uri')
  })
 
  /**
   *  jwks_uri
   *    REQUIRED. URL of the OP's JSON Web Key Set [JWK] document. This contains the
   *    signing key(s) the RP uses to validate signatures from the OP. The JWK Set
   *    MAY also contain the Server's encryption key(s), which are used by RPs to
   *    encrypt requests to the Server. When both signing and encryption keys are
   *    made available, a use (Key Use) parameter value is REQUIRED for all keys in
   *    the referenced JWK Set to indicate each key's intended usage. Although some
   *    algorithms allow the same key to be used for both signatures and encryption,
   *    doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY
   *    be used to provide X.509 representations of keys provided. When used, the
   *    bare key values MUST still be present and MUST match those in the
   *    certificate.
   */
  it('should require "jwks_uri"', () => {
    required.should.include('jwks_uri')
  })
 
  it('should define type of "jwks_uri"', () => {
    properties.jwks_uri.type.should.equal('string')
  })
 
  it('should define format of "jwks_uri"', () => {
    properties.jwks_uri.format.should.equal('uri')
  })
 
  /**
   *  registration_endpoint
   *    RECOMMENDED. URL of the OP's Dynamic Client Registration Endpoint
   *    [OpenID.Registration].
   */
  it('should require "registration_endpoint"', () => {
    required.should.include('registration_endpoint')
  })
 
  it('should define type of "registration_endpoint"', () => {
    properties.registration_endpoint.type.should.equal('string')
  })
 
  it('should define format of "registration_endpoint"', () => {
    properties.registration_endpoint.format.should.equal('uri')
  })
 
  /**
   *  scopes_supported
   *    RECOMMENDED. JSON array containing a list of the OAuth 2.0 [RFC6749] scope
   *    values that this server supports. The server MUST support the openid scope
   *    value. Servers MAY choose not to advertise some supported scope values even
   *    when this parameter is used, although those defined in [OpenID.Core] SHOULD
   *    be listed, if supported.
   */
  it('should define type of "scopes_supported"', () => {
    properties.scopes_supported.type.should.equal('array')
  })
 
  /**
   *  response_types_supported
   *    REQUIRED. JSON array containing a list of the OAuth 2.0 response_type values
   *    that this OP supports. Dynamic OpenID Providers MUST support the code,
   *    id_token, and the token id_token Response Type values.
   */
  it('should define type of "response_types_supported"', () => {
    properties.response_types_supported.type.should.equal('array')
  })
 
  it('should require "response_types_supported"', () => {
    required.should.include('response_types_supported')
  })
 
  it('should define enum of "response_types_supported"', () => {
    properties.response_types_supported.items.enum.should.eql([
      'code',
      'code token',
      'code id_token',
      'id_token',
      'id_token token',
      'code id_token token',
      'none'
    ])
  })
 
  it('should define default of "response_types_supported"', () => {
    properties.response_types_supported.default.should.eql([
      'code',
      'code token',
      'code id_token',
      'id_token',
      'id_token token',
      'code id_token token',
      'none'
    ])
  })
 
  /**
   *  response_modes_supported
   *    OPTIONAL. JSON array containing a list of the OAuth 2.0 response_mode values
   *    that this OP supports, as specified in OAuth 2.0 Multiple Response Type
   *    Encoding Practices [OAuth.Responses]. If omitted, the default for Dynamic
   *    OpenID Providers is ["query", "fragment"].
   */
  it('should define type of "response_modes_supported"', () => {
    properties.response_modes_supported.type.should.equal('array')
  })
 
  it('should define default of "response_modes_supported"', () => {
    properties.response_modes_supported.default.should.eql([
      'query',
      'fragment'
    ])
  })
 
  it('should define enum of "response_modes_supported"', () => {
    properties.response_modes_supported.items.enum.should.eql([
      'query',
      'fragment'
    ])
  })
 
  /**
   *  grant_types_supported
   *    OPTIONAL. JSON array containing a list of the OAuth 2.0 Grant Type values
   *    that this OP supports. Dynamic OpenID Providers MUST support the
   *    authorization_code and implicit Grant Type values and MAY support other
   *    Grant Types. If omitted, the default value is ["authorization_code",
   *    "implicit"].
   */
  it('should define type of "grant_types_supported"', () => {
    properties.grant_types_supported.type.should.equal('array')
  })
 
  it('should define default of "grant_types_supported"', () => {
    properties.grant_types_supported.default.should.eql([
      'authorization_code',
      'implicit',
      'refresh_token',
      'client_credentials'
    ])
  })
 
  it('should define enum of "grant_types_supported"', () => {
    properties.grant_types_supported.items.enum.should.eql([
      'authorization_code',
      'implicit',
      'refresh_token',
      'client_credentials'
    ])
  })
 
  /**
   *  acr_values_supported
   *    OPTIONAL. JSON array containing a list of the Authentication Context Class
   *    References that this OP supports.
   */
  it('should define type of "acr_values_supported"', () => {
    properties.acr_values_supported.type.should.equal('array')
  })
 
  /**
   *  subject_types_supported
   *    REQUIRED. JSON array containing a list of the Subject Identifier types that
   *    this OP supports. Valid types include pairwise and public.
   */
  it('should define type of "subject_types_supported"', () => {
    properties.subject_types_supported.type.should.equal('array')
  })
 
  it('should require "subject_types_supported"', () => {
    required.should.include('subject_types_supported')
  })
 
  it('should define default of "subject_types_supported"', () => {
    properties.subject_types_supported.default.should.eql([
      'public'
    ])
  })
 
  it('should define enum of "subject_types_supported"', () => {
    properties.subject_types_supported.items.enum.should.eql([
      'pairwise',
      'public'
    ])
  })
 
  /**
   *  id_token_signing_alg_values_supported
   *    REQUIRED. JSON array containing a list of the JWS signing algorithms (alg
   *    values) supported by the OP for the ID Token to encode the Claims in a JWT
   *    [JWT]. The algorithm RS256 MUST be included. The value none MAY be supported,
   *    but MUST NOT be used unless the Response Type used returns no ID Token from
   *    the Authorization Endpoint (such as when using the Authorization Code Flow).
   */
  it('should define type of "id_token_signing_alg_values_supported"', () => {
    properties.id_token_signing_alg_values_supported.type.should.equal('array')
  })
 
  it('should require "id_token_signing_alg_values_supported"', () => {
    required.should.include('id_token_signing_alg_values_supported')
  })
 
  it('should define default of "id_token_signing_alg_values_supported"', () => {
    properties.id_token_signing_alg_values_supported.default.should.eql([
      'RS256',
      'RS384',
      'RS512',
      'none'
    ])
  })
 
  it('should define enum of "id_token_signing_alg_values_supported"', () => {
    properties.id_token_signing_alg_values_supported.items.enum.should.eql([
      'RS256',
      'RS384',
      'RS512',
      'none'
    ])
  })
 
 
  /**
   *  id_token_encryption_alg_values_supported
   *    OPTIONAL. JSON array containing a list of the JWE encryption algorithms (alg
   *    values) supported by the OP for the ID Token to encode the Claims in a JWT
   *    [JWT].
   */
  it('should define type of "id_token_encryption_alg_values_supported"', () => {
    properties.id_token_encryption_alg_values_supported.type.should.equal('array')
  })
 
  it('should define enum of "id_token_encryption_alg_values_supported"')
 
  /**
   *  id_token_encryption_enc_values_supported
   *    OPTIONAL. JSON array containing a list of the JWE encryption algorithms (enc
   *    values) supported by the OP for the ID Token to encode the Claims in a JWT
   *    [JWT].
   */
  it('should define type of "id_token_encryption_enc_values_supported"', () => {
    properties.id_token_encryption_enc_values_supported.type.should.equal('array')
  })
 
  it('should define enum of "id_token_encryption_enc_values_supported"')
 
  /**
   *  userinfo_signing_alg_values_supported
   *    OPTIONAL. JSON array containing a list of the JWS [JWS] signing algorithms
   *    (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in
   *    a JWT [JWT]. The value none MAY be included.
   */
  it('should define type of "userinfo_signing_alg_values_supported"', () => {
    properties.userinfo_signing_alg_values_supported.type.should.equal('array')
  })
 
  it('should define enum of "userinfo_signing_alg_values_supported"')
 
  /**
   *  userinfo_encryption_alg_values_supported
   *    OPTIONAL. JSON array containing a list of the JWE [JWE] encryption algorithms
   *    (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in
   *    a JWT [JWT].
   */
  it('should define type of "userinfo_encryption_alg_values_supported"', () => {
    properties.userinfo_encryption_alg_values_supported.type.should.equal('array')
  })
 
  it('should define enum of "userinfo_encryption_alg_values_supported"')
 
  /**
   *  userinfo_encryption_enc_values_supported
   *    OPTIONAL. JSON array containing a list of the JWE encryption algorithms (enc
   *    values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a
   *    JWT [JWT].
   */
  it('should define type of "userinfo_encryption_enc_values_supported"', () => {
    properties.userinfo_encryption_enc_values_supported.type.should.equal('array')
  })
 
  it('should define default of "userinfo_encryption_enc_values_supported"')
 
  /**
   *  request_object_signing_alg_values_supported
   *    OPTIONAL. JSON array containing a list of the JWS signing algorithms (alg
   *    values) supported by the OP for Request Objects, which are described in
   *    Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are
   *    used both when the Request Object is passed by value (using the requesth
   *    parameter) and when it is passed by reference (using the request_uri
   *    parameter). Servers SHOULD support none and RS256.
   */
  it('should define type of "request_object_signing_alg_values_supported"', () => {
    properties.request_object_signing_alg_values_supported.type.should.equal('array')
  })
 
  it('should define enum of "request_object_signing_alg_values_supported"', () => {
    properties.request_object_signing_alg_values_supported.items.enum.should.eql([
      'RS256',
      'none'
    ])
  })
 
  /**
   *  request_object_encryption_alg_values_supported
   *    OPTIONAL. JSON array containing a list of the JWE encryption algorithms (alg
   *    values) supported by the OP for Request Objects. These algorithms are used
   *    both when the Request Object is passed by value and when it is passed by
   *    reference.
   */
  it('should define type of "request_object_encryption_alg_values_supported"', () => {
    properties.request_object_encryption_alg_values_supported.type
      .should.equal('array')
  })
 
  it('should define enum of "request_object_encryption_alg_values_supported"')
 
  /**
   *  request_object_encryption_enc_values_supported
   *    OPTIONAL. JSON array containing a list of the JWE encryption algorithms (enc
   *    values) supported by the OP for Request Objects. These algorithms are used
   *    both when the Request Object is passed by value and when it is passed by
   *    reference.
   */
  it('should define type of "request_object_encryption_enc_values_supported"', () => {
    properties.request_object_encryption_enc_values_supported.type
      .should.equal('array')
  })
 
  it('should define enum of "request_object_encryption_enc_values_supported"')
 
  /**
   *  token_endpoint_auth_methods_supported
   *    OPTIONAL. JSON array containing a list of Client Authentication methods
   *    supported by this Token Endpoint. The options are client_secret_post,
   *    client_secret_basic, client_secret_jwt, and private_key_jwt, as described in
   *    Section 9 of OpenID Connect Core 1.0 [OpenID.Core]. Other authentication
   *    methods MAY be defined by extensions. If omitted, the default is
   *    client_secret_basic -- the HTTP Basic Authentication Scheme specified in
   *    Section 2.3.1 of OAuth 2.0 [RFC6749].
   */
  it('should define type of "token_endpoint_auth_methods_supported"', () => {
    properties.token_endpoint_auth_methods_supported.type.should.equal('array')
  })
 
  it('should define default of "token_endpoint_auth_methods_supported"', () => {
    properties.token_endpoint_auth_methods_supported.default.should.eql([
      'client_secret_basic'
    ])
  })
 
  it('should define enum of "token_endpoint_auth_methods_supported"', () => {
    properties.token_endpoint_auth_methods_supported.items.enum
      .should.eql([
        'client_secret_basic',
        'client_secret_post',
        'client_secret_jwt',
        'private_key_jwt'
      ])
  })
 
  /**
   *  token_endpoint_auth_signing_alg_values_supported
   *    OPTIONAL. JSON array containing a list of the JWS signing algorithms (alg
   *    values) supported by the Token Endpoint for the signature on the JWT [JWT]
   *    used to authenticate the Client at the Token Endpoint for the private_key_jwt
   *    and client_secret_jwt authentication methods. Servers SHOULD support RS256.
   *    The value none MUST NOT be used.
   */
  it('should define type of "token_endpoint_auth_signing_alg_values_supported"', () => {
    properties.token_endpoint_auth_signing_alg_values_supported.type.should.equal('array')
  })
 
  it('should define default of "token_endpoint_auth_signing_alg_values_supported"', () => {
    properties.token_endpoint_auth_signing_alg_values_supported.default
      .should.eql(['RS256'])
  })
 
  it('should define enum of "token_endpoint_auth_signing_alg_values_supported"', () => {
    properties.token_endpoint_auth_signing_alg_values_supported.items.enum
      .should.eql(['RS256'])
  })
 
  /**
   *  display_values_supported
   *    OPTIONAL. JSON array containing a list of the display parameter values that
   *    the OpenID Provider supports. These values are described in Section 3.1.2.1
   *    of OpenID Connect Core 1.0 [OpenID.Core].
   */
  it('should define type of "display_values_supported"', () => {
    properties.display_values_supported.type.should.equal('array')
  })
 
  it('should define default of "display_values_supported"')
  it('should define enum of "display_values_supported"')
 
  /**
   *  claim_types_supported
   *    OPTIONAL. JSON array containing a list of the Claim Types that the OpenID
   *    Provider supports. These Claim Types are described in Section 5.6 of OpenID
   *    Connect Core 1.0 [OpenID.Core]. Values defined by this specification are
   *    normal, aggregated, and distributed. If omitted, the implementation supports
   *    only normal Claims.
   */
  it('should define type of "claim_types_supported"', () => {
    properties.claim_types_supported.type.should.equal('array')
  })
 
  it('should define default of "claim_types_supported"')
  it('should define enum of "claim_types_supported"')
 
  /**
   *  claims_supported
   *    RECOMMENDED. JSON array containing a list of the Claim Names of the Claims
   *    that the OpenID Provider MAY be able to supply values for. Note that for
   *    privacy or other reasons, this might not be an exhaustive list.
   */
  it('should define type of "claims_supported"', () => {
    properties.claims_supported.type.should.equal('array')
  })
 
  it('should define default of "claims_supported"')
  it('should define enum of "claims_supported"')
 
  /**
   *  service_documentation
   *    OPTIONAL. URL of a page containing human-readable information that developers
   *    might want or need to know when using the OpenID Provider. In particular, if
   *    the OpenID Provider does not support Dynamic Client Registration, then
   *    information on how to register Clients needs to be provided in this
   *    documentation.
   */
  it('should define type of "service_documentation"')
  it('should define format of "service_documentation"')
  it('should define default of "service_documentation"')
  it('should define enum of "service_documentation"')
 
  /**
   *  claims_locales_supported
   *    OPTIONAL. Languages and scripts supported for values in Claims being
   *    returned, represented as a JSON array of BCP47 [RFC5646] language tag
   *    values. Not all languages and scripts are necessarily supported for all
   *    Claim values.
   */
  it('should define type of "claims_locales_supported"', () => {
    properties.claims_locales_supported.type.should.equal('array')
  })
 
  it('should define format of "claims_locales_supported"')
 
  /**
   *  ui_locales_supported
   *    OPTIONAL. Languages and scripts supported for the user interface, represented
   *    as a JSON array of BCP47 [RFC5646] language tag values.
   */
  it('should define type of "ui_locales_supported"', () => {
    properties.ui_locales_supported.type.should.equal('array')
  })
 
  it('should define format of "ui_locales_supported"')
 
  /**
   *  claims_parameter_supported
   *    OPTIONAL. Boolean value specifying whether the OP supports use of the claims
   *    parameter, with true indicating support. If omitted, the default value is
   *    false.
   */
  it('should define type of "claims_parameter_supported"', () => {
    properties.claims_parameter_supported.type.should.equal('boolean')
  })
 
  it('should define default of "claims_parameter_supported"', () => {
    properties.claims_parameter_supported.default.should.equal(false)
  })
 
  /**
   *  request_parameter_supported
   *    OPTIONAL. Boolean value specifying whether the OP supports use of the request
   *    parameter, with true indicating support. If omitted, the default value is
   *    false.
   */
  it('should define type of "request_parameter_supported"', () => {
    properties.request_parameter_supported.type.should.equal('boolean')
  })
 
  it('should define default of "request_parameter_supported"', () => {
    properties.request_parameter_supported.default.should.equal(false)
  })
 
  /**
   *  request_uri_parameter_supported
   *    OPTIONAL. Boolean value specifying whether the OP supports use of the
   *    request_uri parameter, with true indicating support. If omitted, the default
   *    value is true.
   */
  it('should define type of "request_uri_parameter_supported"', () => {
    properties.request_uri_parameter_supported.type.should.equal('boolean')
  })
 
  it('should define default of "request_uri_parameter_supported"', () => {
    properties.request_uri_parameter_supported.default.should.equal(true)
  })
 
  /**
   *  require_request_uri_registration
   *    OPTIONAL. Boolean value specifying whether the OP requires any request_uri
   *    values used to be pre-registered using the request_uris registration
   *    parameter. Pre-registration is REQUIRED when the value is true. If omitted,
   *    the default value is false.
   */
  it('should define type of "require_request_uri_registration"', () => {
    properties.require_request_uri_registration.type.should.equal('boolean')
  })
 
  it('should define default of "require_request_uri_registration"', () => {
    properties.require_request_uri_registration.default.should.equal(false)
  })
 
  /**
   *  op_policy_uri
   *    OPTIONAL. URL that the OpenID Provider provides to the person registering the
   *    Client to read about the OP's requirements on how the Relying Party can use
   *    the data provided by the OP. The registration process SHOULD display this URL
   *    to the person registering the Client if it is given.
   */
  it('should define type of "op_policy_uri"', () => {
    properties.op_policy_uri.type.should.equal('string')
  })
 
  it('should define format of "op_policy_uri"', () => {
    properties.op_policy_uri.format.should.equal('uri')
  })
 
  /**
   *  op_tos_uri
   *    OPTIONAL. URL that the OpenID Provider provides to the person registering the
   *    Client to read about OpenID Provider's terms of service. The registration
   *    process SHOULD display this URL to the person registering the Client if it is
   *    given.
   */
  it('should define type of "op_tos_uri"', () => {
    properties.op_tos_uri.type.should.equal('string')
  })
 
  it('should define format of "op_tos_uri"', () => {
    properties.op_tos_uri.format.should.equal('uri')
  })
 
  /**
   *  Additional OpenID Provider Metadata parameters MAY also be used. Some are
   *  defined by other specifications, such as OpenID Connect Session Management 1.0
   *  [OpenID.Session].
   */
 
  // TODO SESSION SPEC ENDPOINTS (check_session_iframe, end_session_endpoint)
 
  it('should define type of "check_session_iframe"', () => {
    properties.check_session_iframe.type.should.equal('string')
  })
 
  it('should define format of "check_session_iframe"', () => {
    properties.check_session_iframe.format.should.equal('uri')
  })
 
  it('should require "check_session_iframe"', () => {
    required.should.include('check_session_iframe')
  })
 
  it('should require "end_session_endpoint"', () => {
    required.should.include('end_session_endpoint')
  })
 
  it('should define type of "end_session_endpoint"', () => {
    properties.end_session_endpoint.type.should.equal('string')
  })
 
  it('should define format of "end_session_endpoint"', () => {
    properties.end_session_endpoint.format.should.equal('uri')
  })
 
})