001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2008 Sun Microsystems, Inc. 015 */ 016package org.forgerock.opendj.server.config.meta; 017 018 019 020import java.util.Collection; 021import java.util.SortedSet; 022import org.forgerock.opendj.config.AdministratorAction; 023import org.forgerock.opendj.config.AggregationPropertyDefinition; 024import org.forgerock.opendj.config.AliasDefaultBehaviorProvider; 025import org.forgerock.opendj.config.BooleanPropertyDefinition; 026import org.forgerock.opendj.config.ClassPropertyDefinition; 027import org.forgerock.opendj.config.client.ConcurrentModificationException; 028import org.forgerock.opendj.config.client.ManagedObject; 029import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException; 030import org.forgerock.opendj.config.client.OperationRejectedException; 031import org.forgerock.opendj.config.conditions.Conditions; 032import org.forgerock.opendj.config.DefaultBehaviorProvider; 033import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider; 034import org.forgerock.opendj.config.DurationPropertyDefinition; 035import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException; 036import org.forgerock.opendj.config.ManagedObjectDefinition; 037import org.forgerock.opendj.config.PropertyOption; 038import org.forgerock.opendj.config.PropertyProvider; 039import org.forgerock.opendj.config.server.ConfigurationChangeListener; 040import org.forgerock.opendj.config.server.ServerManagedObject; 041import org.forgerock.opendj.config.StringPropertyDefinition; 042import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider; 043import org.forgerock.opendj.ldap.DN; 044import org.forgerock.opendj.ldap.LdapException; 045import org.forgerock.opendj.server.config.client.HTTPOauth2OpenamAuthorizationMechanismCfgClient; 046import org.forgerock.opendj.server.config.client.IdentityMapperCfgClient; 047import org.forgerock.opendj.server.config.client.KeyManagerProviderCfgClient; 048import org.forgerock.opendj.server.config.client.TrustManagerProviderCfgClient; 049import org.forgerock.opendj.server.config.server.HTTPAuthorizationMechanismCfg; 050import org.forgerock.opendj.server.config.server.HTTPOauth2AuthorizationMechanismCfg; 051import org.forgerock.opendj.server.config.server.HTTPOauth2OpenamAuthorizationMechanismCfg; 052import org.forgerock.opendj.server.config.server.IdentityMapperCfg; 053import org.forgerock.opendj.server.config.server.KeyManagerProviderCfg; 054import org.forgerock.opendj.server.config.server.TrustManagerProviderCfg; 055 056 057 058/** 059 * An interface for querying the HTTP Oauth2 Openam Authorization 060 * Mechanism managed object definition meta information. 061 * <p> 062 * The HTTP Oauth2 Openam Authorization Mechanism is used to define 063 * OAuth2 authorization using an OpenAM server as authorization server 064 * . 065 */ 066public final class HTTPOauth2OpenamAuthorizationMechanismCfgDefn extends ManagedObjectDefinition<HTTPOauth2OpenamAuthorizationMechanismCfgClient, HTTPOauth2OpenamAuthorizationMechanismCfg> { 067 068 /** The singleton configuration definition instance. */ 069 private static final HTTPOauth2OpenamAuthorizationMechanismCfgDefn INSTANCE = new HTTPOauth2OpenamAuthorizationMechanismCfgDefn(); 070 071 072 073 /** The "authzid-json-pointer" property definition. */ 074 private static final StringPropertyDefinition PD_AUTHZID_JSON_POINTER; 075 076 077 078 /** The "java-class" property definition. */ 079 private static final ClassPropertyDefinition PD_JAVA_CLASS; 080 081 082 083 /** The "key-manager-provider" property definition. */ 084 private static final AggregationPropertyDefinition<KeyManagerProviderCfgClient, KeyManagerProviderCfg> PD_KEY_MANAGER_PROVIDER; 085 086 087 088 /** The "token-info-url" property definition. */ 089 private static final StringPropertyDefinition PD_TOKEN_INFO_URL; 090 091 092 093 /** The "trust-manager-provider" property definition. */ 094 private static final AggregationPropertyDefinition<TrustManagerProviderCfgClient, TrustManagerProviderCfg> PD_TRUST_MANAGER_PROVIDER; 095 096 097 098 /** Build the "authzid-json-pointer" property definition. */ 099 static { 100 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "authzid-json-pointer"); 101 builder.setOption(PropertyOption.MANDATORY); 102 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "authzid-json-pointer")); 103 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>()); 104 PD_AUTHZID_JSON_POINTER = builder.getInstance(); 105 INSTANCE.registerPropertyDefinition(PD_AUTHZID_JSON_POINTER); 106 } 107 108 109 110 /** Build the "java-class" property definition. */ 111 static { 112 ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class"); 113 builder.setOption(PropertyOption.MANDATORY); 114 builder.setOption(PropertyOption.ADVANCED); 115 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "java-class")); 116 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.protocols.http.authz.HttpOAuth2OpenAmAuthorizationMechanism"); 117 builder.setDefaultBehaviorProvider(provider); 118 builder.addInstanceOf("org.opends.server.protocols.http.authz.HttpAuthorizationMechanism"); 119 PD_JAVA_CLASS = builder.getInstance(); 120 INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS); 121 } 122 123 124 125 /** Build the "key-manager-provider" property definition. */ 126 static { 127 AggregationPropertyDefinition.Builder<KeyManagerProviderCfgClient, KeyManagerProviderCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "key-manager-provider"); 128 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "key-manager-provider")); 129 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "key-manager-provider")); 130 builder.setParentPath("/"); 131 builder.setRelationDefinition("key-manager-provider"); 132 builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true")); 133 PD_KEY_MANAGER_PROVIDER = builder.getInstance(); 134 INSTANCE.registerPropertyDefinition(PD_KEY_MANAGER_PROVIDER); 135 INSTANCE.registerConstraint(PD_KEY_MANAGER_PROVIDER.getSourceConstraint()); 136 } 137 138 139 140 /** Build the "token-info-url" property definition. */ 141 static { 142 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "token-info-url"); 143 builder.setOption(PropertyOption.MANDATORY); 144 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "token-info-url")); 145 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>()); 146 PD_TOKEN_INFO_URL = builder.getInstance(); 147 INSTANCE.registerPropertyDefinition(PD_TOKEN_INFO_URL); 148 } 149 150 151 152 /** Build the "trust-manager-provider" property definition. */ 153 static { 154 AggregationPropertyDefinition.Builder<TrustManagerProviderCfgClient, TrustManagerProviderCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "trust-manager-provider"); 155 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "trust-manager-provider")); 156 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "trust-manager-provider")); 157 builder.setParentPath("/"); 158 builder.setRelationDefinition("trust-manager-provider"); 159 builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true")); 160 PD_TRUST_MANAGER_PROVIDER = builder.getInstance(); 161 INSTANCE.registerPropertyDefinition(PD_TRUST_MANAGER_PROVIDER); 162 INSTANCE.registerConstraint(PD_TRUST_MANAGER_PROVIDER.getSourceConstraint()); 163 } 164 165 166 167 /** 168 * Get the HTTP Oauth2 Openam Authorization Mechanism configuration 169 * definition singleton. 170 * 171 * @return Returns the HTTP Oauth2 Openam Authorization Mechanism 172 * configuration definition singleton. 173 */ 174 public static HTTPOauth2OpenamAuthorizationMechanismCfgDefn getInstance() { 175 return INSTANCE; 176 } 177 178 179 180 /** 181 * Private constructor. 182 */ 183 private HTTPOauth2OpenamAuthorizationMechanismCfgDefn() { 184 super("http-oauth2-openam-authorization-mechanism", HTTPOauth2AuthorizationMechanismCfgDefn.getInstance()); 185 } 186 187 188 189 /** {@inheritDoc} */ 190 public HTTPOauth2OpenamAuthorizationMechanismCfgClient createClientConfiguration( 191 ManagedObject<? extends HTTPOauth2OpenamAuthorizationMechanismCfgClient> impl) { 192 return new HTTPOauth2OpenamAuthorizationMechanismCfgClientImpl(impl); 193 } 194 195 196 197 /** {@inheritDoc} */ 198 public HTTPOauth2OpenamAuthorizationMechanismCfg createServerConfiguration( 199 ServerManagedObject<? extends HTTPOauth2OpenamAuthorizationMechanismCfg> impl) { 200 return new HTTPOauth2OpenamAuthorizationMechanismCfgServerImpl(impl); 201 } 202 203 204 205 /** {@inheritDoc} */ 206 public Class<HTTPOauth2OpenamAuthorizationMechanismCfg> getServerConfigurationClass() { 207 return HTTPOauth2OpenamAuthorizationMechanismCfg.class; 208 } 209 210 211 212 /** 213 * Get the "access-token-cache-enabled" property definition. 214 * <p> 215 * Indicates whether the HTTP Oauth2 Openam Authorization Mechanism 216 * is enabled for use. 217 * 218 * @return Returns the "access-token-cache-enabled" property definition. 219 */ 220 public BooleanPropertyDefinition getAccessTokenCacheEnabledPropertyDefinition() { 221 return HTTPOauth2AuthorizationMechanismCfgDefn.getInstance().getAccessTokenCacheEnabledPropertyDefinition(); 222 } 223 224 225 226 /** 227 * Get the "access-token-cache-expiration" property definition. 228 * <p> 229 * Token cache expiration 230 * 231 * @return Returns the "access-token-cache-expiration" property definition. 232 */ 233 public DurationPropertyDefinition getAccessTokenCacheExpirationPropertyDefinition() { 234 return HTTPOauth2AuthorizationMechanismCfgDefn.getInstance().getAccessTokenCacheExpirationPropertyDefinition(); 235 } 236 237 238 239 /** 240 * Get the "authzid-json-pointer" property definition. 241 * <p> 242 * Specifies the JSON pointer to the value to use as Authorization 243 * ID. The JSON pointer is applied to the resolved access token JSON 244 * document. (example: /uid) 245 * 246 * @return Returns the "authzid-json-pointer" property definition. 247 */ 248 public StringPropertyDefinition getAuthzidJsonPointerPropertyDefinition() { 249 return PD_AUTHZID_JSON_POINTER; 250 } 251 252 253 254 /** 255 * Get the "enabled" property definition. 256 * <p> 257 * Indicates whether the HTTP Oauth2 Openam Authorization Mechanism 258 * is enabled. 259 * 260 * @return Returns the "enabled" property definition. 261 */ 262 public BooleanPropertyDefinition getEnabledPropertyDefinition() { 263 return HTTPOauth2AuthorizationMechanismCfgDefn.getInstance().getEnabledPropertyDefinition(); 264 } 265 266 267 268 /** 269 * Get the "identity-mapper" property definition. 270 * <p> 271 * > Specifies the name of the identity mapper to use in conjunction 272 * with the authzid-json-pointer to get the user corresponding to the 273 * acccess-token. 274 * 275 * @return Returns the "identity-mapper" property definition. 276 */ 277 public AggregationPropertyDefinition<IdentityMapperCfgClient, IdentityMapperCfg> getIdentityMapperPropertyDefinition() { 278 return HTTPOauth2AuthorizationMechanismCfgDefn.getInstance().getIdentityMapperPropertyDefinition(); 279 } 280 281 282 283 /** 284 * Get the "java-class" property definition. 285 * <p> 286 * Specifies the fully-qualified name of the Java class that 287 * provides the HTTP Oauth2 Openam Authorization Mechanism 288 * implementation. 289 * 290 * @return Returns the "java-class" property definition. 291 */ 292 public ClassPropertyDefinition getJavaClassPropertyDefinition() { 293 return PD_JAVA_CLASS; 294 } 295 296 297 298 /** 299 * Get the "key-manager-provider" property definition. 300 * <p> 301 * Specifies the name of the key manager that should be used with 302 * this HTTP Oauth2 Openam Authorization Mechanism . 303 * 304 * @return Returns the "key-manager-provider" property definition. 305 */ 306 public AggregationPropertyDefinition<KeyManagerProviderCfgClient, KeyManagerProviderCfg> getKeyManagerProviderPropertyDefinition() { 307 return PD_KEY_MANAGER_PROVIDER; 308 } 309 310 311 312 /** 313 * Get the "required-scope" property definition. 314 * <p> 315 * Scopes required to grant access to the service. 316 * 317 * @return Returns the "required-scope" property definition. 318 */ 319 public StringPropertyDefinition getRequiredScopePropertyDefinition() { 320 return HTTPOauth2AuthorizationMechanismCfgDefn.getInstance().getRequiredScopePropertyDefinition(); 321 } 322 323 324 325 /** 326 * Get the "token-info-url" property definition. 327 * <p> 328 * Defines the OpenAM endpoint URL where the access-token resolution 329 * request should be sent. 330 * 331 * @return Returns the "token-info-url" property definition. 332 */ 333 public StringPropertyDefinition getTokenInfoUrlPropertyDefinition() { 334 return PD_TOKEN_INFO_URL; 335 } 336 337 338 339 /** 340 * Get the "trust-manager-provider" property definition. 341 * <p> 342 * Specifies the name of the trust manager that should be used when 343 * negotiating SSL connections with the remote authorization server. 344 * 345 * @return Returns the "trust-manager-provider" property definition. 346 */ 347 public AggregationPropertyDefinition<TrustManagerProviderCfgClient, TrustManagerProviderCfg> getTrustManagerProviderPropertyDefinition() { 348 return PD_TRUST_MANAGER_PROVIDER; 349 } 350 351 352 353 /** 354 * Managed object client implementation. 355 */ 356 private static class HTTPOauth2OpenamAuthorizationMechanismCfgClientImpl implements 357 HTTPOauth2OpenamAuthorizationMechanismCfgClient { 358 359 /** Private implementation. */ 360 private ManagedObject<? extends HTTPOauth2OpenamAuthorizationMechanismCfgClient> impl; 361 362 363 364 /** Private constructor. */ 365 private HTTPOauth2OpenamAuthorizationMechanismCfgClientImpl( 366 ManagedObject<? extends HTTPOauth2OpenamAuthorizationMechanismCfgClient> impl) { 367 this.impl = impl; 368 } 369 370 371 372 /** {@inheritDoc} */ 373 public boolean isAccessTokenCacheEnabled() { 374 return impl.getPropertyValue(INSTANCE.getAccessTokenCacheEnabledPropertyDefinition()); 375 } 376 377 378 379 /** {@inheritDoc} */ 380 public void setAccessTokenCacheEnabled(boolean value) { 381 impl.setPropertyValue(INSTANCE.getAccessTokenCacheEnabledPropertyDefinition(), value); 382 } 383 384 385 386 /** {@inheritDoc} */ 387 public Long getAccessTokenCacheExpiration() { 388 return impl.getPropertyValue(INSTANCE.getAccessTokenCacheExpirationPropertyDefinition()); 389 } 390 391 392 393 /** {@inheritDoc} */ 394 public void setAccessTokenCacheExpiration(Long value) { 395 impl.setPropertyValue(INSTANCE.getAccessTokenCacheExpirationPropertyDefinition(), value); 396 } 397 398 399 400 /** {@inheritDoc} */ 401 public String getAuthzidJsonPointer() { 402 return impl.getPropertyValue(INSTANCE.getAuthzidJsonPointerPropertyDefinition()); 403 } 404 405 406 407 /** {@inheritDoc} */ 408 public void setAuthzidJsonPointer(String value) { 409 impl.setPropertyValue(INSTANCE.getAuthzidJsonPointerPropertyDefinition(), value); 410 } 411 412 413 414 /** {@inheritDoc} */ 415 public Boolean isEnabled() { 416 return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 417 } 418 419 420 421 /** {@inheritDoc} */ 422 public void setEnabled(boolean value) { 423 impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value); 424 } 425 426 427 428 /** {@inheritDoc} */ 429 public String getIdentityMapper() { 430 return impl.getPropertyValue(INSTANCE.getIdentityMapperPropertyDefinition()); 431 } 432 433 434 435 /** {@inheritDoc} */ 436 public void setIdentityMapper(String value) { 437 impl.setPropertyValue(INSTANCE.getIdentityMapperPropertyDefinition(), value); 438 } 439 440 441 442 /** {@inheritDoc} */ 443 public String getJavaClass() { 444 return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 445 } 446 447 448 449 /** {@inheritDoc} */ 450 public void setJavaClass(String value) { 451 impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value); 452 } 453 454 455 456 /** {@inheritDoc} */ 457 public String getKeyManagerProvider() { 458 return impl.getPropertyValue(INSTANCE.getKeyManagerProviderPropertyDefinition()); 459 } 460 461 462 463 /** {@inheritDoc} */ 464 public void setKeyManagerProvider(String value) { 465 impl.setPropertyValue(INSTANCE.getKeyManagerProviderPropertyDefinition(), value); 466 } 467 468 469 470 /** {@inheritDoc} */ 471 public SortedSet<String> getRequiredScope() { 472 return impl.getPropertyValues(INSTANCE.getRequiredScopePropertyDefinition()); 473 } 474 475 476 477 /** {@inheritDoc} */ 478 public void setRequiredScope(Collection<String> values) { 479 impl.setPropertyValues(INSTANCE.getRequiredScopePropertyDefinition(), values); 480 } 481 482 483 484 /** {@inheritDoc} */ 485 public String getTokenInfoUrl() { 486 return impl.getPropertyValue(INSTANCE.getTokenInfoUrlPropertyDefinition()); 487 } 488 489 490 491 /** {@inheritDoc} */ 492 public void setTokenInfoUrl(String value) { 493 impl.setPropertyValue(INSTANCE.getTokenInfoUrlPropertyDefinition(), value); 494 } 495 496 497 498 /** {@inheritDoc} */ 499 public String getTrustManagerProvider() { 500 return impl.getPropertyValue(INSTANCE.getTrustManagerProviderPropertyDefinition()); 501 } 502 503 504 505 /** {@inheritDoc} */ 506 public void setTrustManagerProvider(String value) { 507 impl.setPropertyValue(INSTANCE.getTrustManagerProviderPropertyDefinition(), value); 508 } 509 510 511 512 /** {@inheritDoc} */ 513 public ManagedObjectDefinition<? extends HTTPOauth2OpenamAuthorizationMechanismCfgClient, ? extends HTTPOauth2OpenamAuthorizationMechanismCfg> definition() { 514 return INSTANCE; 515 } 516 517 518 519 /** {@inheritDoc} */ 520 public PropertyProvider properties() { 521 return impl; 522 } 523 524 525 526 /** {@inheritDoc} */ 527 public void commit() throws ManagedObjectAlreadyExistsException, 528 MissingMandatoryPropertiesException, ConcurrentModificationException, 529 OperationRejectedException, LdapException { 530 impl.commit(); 531 } 532 533 534 535 /** {@inheritDoc} */ 536 public String toString() { 537 return impl.toString(); 538 } 539 } 540 541 542 543 /** 544 * Managed object server implementation. 545 */ 546 private static class HTTPOauth2OpenamAuthorizationMechanismCfgServerImpl implements 547 HTTPOauth2OpenamAuthorizationMechanismCfg { 548 549 /** Private implementation. */ 550 private ServerManagedObject<? extends HTTPOauth2OpenamAuthorizationMechanismCfg> impl; 551 552 /** The value of the "access-token-cache-enabled" property. */ 553 private final boolean pAccessTokenCacheEnabled; 554 555 /** The value of the "access-token-cache-expiration" property. */ 556 private final Long pAccessTokenCacheExpiration; 557 558 /** The value of the "authzid-json-pointer" property. */ 559 private final String pAuthzidJsonPointer; 560 561 /** The value of the "enabled" property. */ 562 private final boolean pEnabled; 563 564 /** The value of the "identity-mapper" property. */ 565 private final String pIdentityMapper; 566 567 /** The value of the "java-class" property. */ 568 private final String pJavaClass; 569 570 /** The value of the "key-manager-provider" property. */ 571 private final String pKeyManagerProvider; 572 573 /** The value of the "required-scope" property. */ 574 private final SortedSet<String> pRequiredScope; 575 576 /** The value of the "token-info-url" property. */ 577 private final String pTokenInfoUrl; 578 579 /** The value of the "trust-manager-provider" property. */ 580 private final String pTrustManagerProvider; 581 582 583 584 /** Private constructor. */ 585 private HTTPOauth2OpenamAuthorizationMechanismCfgServerImpl(ServerManagedObject<? extends HTTPOauth2OpenamAuthorizationMechanismCfg> impl) { 586 this.impl = impl; 587 this.pAccessTokenCacheEnabled = impl.getPropertyValue(INSTANCE.getAccessTokenCacheEnabledPropertyDefinition()); 588 this.pAccessTokenCacheExpiration = impl.getPropertyValue(INSTANCE.getAccessTokenCacheExpirationPropertyDefinition()); 589 this.pAuthzidJsonPointer = impl.getPropertyValue(INSTANCE.getAuthzidJsonPointerPropertyDefinition()); 590 this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 591 this.pIdentityMapper = impl.getPropertyValue(INSTANCE.getIdentityMapperPropertyDefinition()); 592 this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 593 this.pKeyManagerProvider = impl.getPropertyValue(INSTANCE.getKeyManagerProviderPropertyDefinition()); 594 this.pRequiredScope = impl.getPropertyValues(INSTANCE.getRequiredScopePropertyDefinition()); 595 this.pTokenInfoUrl = impl.getPropertyValue(INSTANCE.getTokenInfoUrlPropertyDefinition()); 596 this.pTrustManagerProvider = impl.getPropertyValue(INSTANCE.getTrustManagerProviderPropertyDefinition()); 597 } 598 599 600 601 /** {@inheritDoc} */ 602 public void addHTTPOauth2OpenamAuthorizationMechanismChangeListener( 603 ConfigurationChangeListener<HTTPOauth2OpenamAuthorizationMechanismCfg> listener) { 604 impl.registerChangeListener(listener); 605 } 606 607 608 609 /** {@inheritDoc} */ 610 public void removeHTTPOauth2OpenamAuthorizationMechanismChangeListener( 611 ConfigurationChangeListener<HTTPOauth2OpenamAuthorizationMechanismCfg> listener) { 612 impl.deregisterChangeListener(listener); 613 } 614 /** {@inheritDoc} */ 615 public void addHTTPOauth2AuthorizationMechanismChangeListener( 616 ConfigurationChangeListener<HTTPOauth2AuthorizationMechanismCfg> listener) { 617 impl.registerChangeListener(listener); 618 } 619 620 621 622 /** {@inheritDoc} */ 623 public void removeHTTPOauth2AuthorizationMechanismChangeListener( 624 ConfigurationChangeListener<HTTPOauth2AuthorizationMechanismCfg> listener) { 625 impl.deregisterChangeListener(listener); 626 } 627 /** {@inheritDoc} */ 628 public void addChangeListener( 629 ConfigurationChangeListener<HTTPAuthorizationMechanismCfg> listener) { 630 impl.registerChangeListener(listener); 631 } 632 633 634 635 /** {@inheritDoc} */ 636 public void removeChangeListener( 637 ConfigurationChangeListener<HTTPAuthorizationMechanismCfg> listener) { 638 impl.deregisterChangeListener(listener); 639 } 640 641 642 643 /** {@inheritDoc} */ 644 public boolean isAccessTokenCacheEnabled() { 645 return pAccessTokenCacheEnabled; 646 } 647 648 649 650 /** {@inheritDoc} */ 651 public Long getAccessTokenCacheExpiration() { 652 return pAccessTokenCacheExpiration; 653 } 654 655 656 657 /** {@inheritDoc} */ 658 public String getAuthzidJsonPointer() { 659 return pAuthzidJsonPointer; 660 } 661 662 663 664 /** {@inheritDoc} */ 665 public boolean isEnabled() { 666 return pEnabled; 667 } 668 669 670 671 /** {@inheritDoc} */ 672 public String getIdentityMapper() { 673 return pIdentityMapper; 674 } 675 676 677 678 /** 679 * {@inheritDoc} 680 */ 681 public DN getIdentityMapperDN() { 682 String value = getIdentityMapper(); 683 if (value == null) return null; 684 return INSTANCE.getIdentityMapperPropertyDefinition().getChildDN(value); 685 } 686 687 688 689 /** {@inheritDoc} */ 690 public String getJavaClass() { 691 return pJavaClass; 692 } 693 694 695 696 /** {@inheritDoc} */ 697 public String getKeyManagerProvider() { 698 return pKeyManagerProvider; 699 } 700 701 702 703 /** 704 * {@inheritDoc} 705 */ 706 public DN getKeyManagerProviderDN() { 707 String value = getKeyManagerProvider(); 708 if (value == null) return null; 709 return INSTANCE.getKeyManagerProviderPropertyDefinition().getChildDN(value); 710 } 711 712 713 714 /** {@inheritDoc} */ 715 public SortedSet<String> getRequiredScope() { 716 return pRequiredScope; 717 } 718 719 720 721 /** {@inheritDoc} */ 722 public String getTokenInfoUrl() { 723 return pTokenInfoUrl; 724 } 725 726 727 728 /** {@inheritDoc} */ 729 public String getTrustManagerProvider() { 730 return pTrustManagerProvider; 731 } 732 733 734 735 /** 736 * {@inheritDoc} 737 */ 738 public DN getTrustManagerProviderDN() { 739 String value = getTrustManagerProvider(); 740 if (value == null) return null; 741 return INSTANCE.getTrustManagerProviderPropertyDefinition().getChildDN(value); 742 } 743 744 745 746 /** {@inheritDoc} */ 747 public Class<? extends HTTPOauth2OpenamAuthorizationMechanismCfg> configurationClass() { 748 return HTTPOauth2OpenamAuthorizationMechanismCfg.class; 749 } 750 751 752 753 /** {@inheritDoc} */ 754 public DN dn() { 755 return impl.getDN(); 756 } 757 758 759 760 /** {@inheritDoc} */ 761 public String toString() { 762 return impl.toString(); 763 } 764 } 765}