All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.cdklabs.cdk.verified.permissions.OpenIdConnectConfiguration Maven / Gradle / Ivy

The newest version!
package io.github.cdklabs.cdk.verified.permissions;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-11T10:47:53.517Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.verified.permissions.$Module.class, fqn = "@cdklabs/cdk-verified-permissions.OpenIdConnectConfiguration")
@software.amazon.jsii.Jsii.Proxy(OpenIdConnectConfiguration.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface OpenIdConnectConfiguration extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) The issuer URL of an OIDC identity provider.
     * 

* This URL must have an OIDC discovery endpoint at the path .well-known/openid-configuration */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getIssuer(); /** * (experimental) The configuration for processing access tokens from your OIDC identity provider Exactly one between accessTokenOnly and identityTokenOnly must be defined. *

* Default: - no Access Token Config */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable io.github.cdklabs.cdk.verified.permissions.OpenIdConnectAccessTokenConfiguration getAccessTokenOnly() { return null; } /** * (experimental) A descriptive string that you want to prefix to user entities from your OIDC identity provider. *

* Default: - no Entity ID Prefix */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getEntityIdPrefix() { return null; } /** * (experimental) The claim in OIDC identity provider tokens that indicates a user's group membership, and the entity type that you want to map it to. *

* Default: - no Group Config */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable io.github.cdklabs.cdk.verified.permissions.OpenIdConnectGroupConfiguration getGroupConfiguration() { return null; } /** * (experimental) The configuration for processing identity (ID) tokens from your OIDC identity provider Exactly one between accessTokenOnly and identityTokenOnly must be defined. *

* Default: - no ID Token Config */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable io.github.cdklabs.cdk.verified.permissions.OpenIdConnectIdentityTokenConfiguration getIdentityTokenOnly() { return null; } /** * @return a {@link Builder} of {@link OpenIdConnectConfiguration} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link OpenIdConnectConfiguration} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.lang.String issuer; io.github.cdklabs.cdk.verified.permissions.OpenIdConnectAccessTokenConfiguration accessTokenOnly; java.lang.String entityIdPrefix; io.github.cdklabs.cdk.verified.permissions.OpenIdConnectGroupConfiguration groupConfiguration; io.github.cdklabs.cdk.verified.permissions.OpenIdConnectIdentityTokenConfiguration identityTokenOnly; /** * Sets the value of {@link OpenIdConnectConfiguration#getIssuer} * @param issuer The issuer URL of an OIDC identity provider. This parameter is required. * This URL must have an OIDC discovery endpoint at the path .well-known/openid-configuration * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder issuer(java.lang.String issuer) { this.issuer = issuer; return this; } /** * Sets the value of {@link OpenIdConnectConfiguration#getAccessTokenOnly} * @param accessTokenOnly The configuration for processing access tokens from your OIDC identity provider Exactly one between accessTokenOnly and identityTokenOnly must be defined. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder accessTokenOnly(io.github.cdklabs.cdk.verified.permissions.OpenIdConnectAccessTokenConfiguration accessTokenOnly) { this.accessTokenOnly = accessTokenOnly; return this; } /** * Sets the value of {@link OpenIdConnectConfiguration#getEntityIdPrefix} * @param entityIdPrefix A descriptive string that you want to prefix to user entities from your OIDC identity provider. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder entityIdPrefix(java.lang.String entityIdPrefix) { this.entityIdPrefix = entityIdPrefix; return this; } /** * Sets the value of {@link OpenIdConnectConfiguration#getGroupConfiguration} * @param groupConfiguration The claim in OIDC identity provider tokens that indicates a user's group membership, and the entity type that you want to map it to. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder groupConfiguration(io.github.cdklabs.cdk.verified.permissions.OpenIdConnectGroupConfiguration groupConfiguration) { this.groupConfiguration = groupConfiguration; return this; } /** * Sets the value of {@link OpenIdConnectConfiguration#getIdentityTokenOnly} * @param identityTokenOnly The configuration for processing identity (ID) tokens from your OIDC identity provider Exactly one between accessTokenOnly and identityTokenOnly must be defined. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder identityTokenOnly(io.github.cdklabs.cdk.verified.permissions.OpenIdConnectIdentityTokenConfiguration identityTokenOnly) { this.identityTokenOnly = identityTokenOnly; return this; } /** * Builds the configured instance. * @return a new instance of {@link OpenIdConnectConfiguration} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public OpenIdConnectConfiguration build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link OpenIdConnectConfiguration} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements OpenIdConnectConfiguration { private final java.lang.String issuer; private final io.github.cdklabs.cdk.verified.permissions.OpenIdConnectAccessTokenConfiguration accessTokenOnly; private final java.lang.String entityIdPrefix; private final io.github.cdklabs.cdk.verified.permissions.OpenIdConnectGroupConfiguration groupConfiguration; private final io.github.cdklabs.cdk.verified.permissions.OpenIdConnectIdentityTokenConfiguration identityTokenOnly; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.issuer = software.amazon.jsii.Kernel.get(this, "issuer", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.accessTokenOnly = software.amazon.jsii.Kernel.get(this, "accessTokenOnly", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.verified.permissions.OpenIdConnectAccessTokenConfiguration.class)); this.entityIdPrefix = software.amazon.jsii.Kernel.get(this, "entityIdPrefix", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.groupConfiguration = software.amazon.jsii.Kernel.get(this, "groupConfiguration", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.verified.permissions.OpenIdConnectGroupConfiguration.class)); this.identityTokenOnly = software.amazon.jsii.Kernel.get(this, "identityTokenOnly", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.verified.permissions.OpenIdConnectIdentityTokenConfiguration.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.issuer = java.util.Objects.requireNonNull(builder.issuer, "issuer is required"); this.accessTokenOnly = builder.accessTokenOnly; this.entityIdPrefix = builder.entityIdPrefix; this.groupConfiguration = builder.groupConfiguration; this.identityTokenOnly = builder.identityTokenOnly; } @Override public final java.lang.String getIssuer() { return this.issuer; } @Override public final io.github.cdklabs.cdk.verified.permissions.OpenIdConnectAccessTokenConfiguration getAccessTokenOnly() { return this.accessTokenOnly; } @Override public final java.lang.String getEntityIdPrefix() { return this.entityIdPrefix; } @Override public final io.github.cdklabs.cdk.verified.permissions.OpenIdConnectGroupConfiguration getGroupConfiguration() { return this.groupConfiguration; } @Override public final io.github.cdklabs.cdk.verified.permissions.OpenIdConnectIdentityTokenConfiguration getIdentityTokenOnly() { return this.identityTokenOnly; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("issuer", om.valueToTree(this.getIssuer())); if (this.getAccessTokenOnly() != null) { data.set("accessTokenOnly", om.valueToTree(this.getAccessTokenOnly())); } if (this.getEntityIdPrefix() != null) { data.set("entityIdPrefix", om.valueToTree(this.getEntityIdPrefix())); } if (this.getGroupConfiguration() != null) { data.set("groupConfiguration", om.valueToTree(this.getGroupConfiguration())); } if (this.getIdentityTokenOnly() != null) { data.set("identityTokenOnly", om.valueToTree(this.getIdentityTokenOnly())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@cdklabs/cdk-verified-permissions.OpenIdConnectConfiguration")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OpenIdConnectConfiguration.Jsii$Proxy that = (OpenIdConnectConfiguration.Jsii$Proxy) o; if (!issuer.equals(that.issuer)) return false; if (this.accessTokenOnly != null ? !this.accessTokenOnly.equals(that.accessTokenOnly) : that.accessTokenOnly != null) return false; if (this.entityIdPrefix != null ? !this.entityIdPrefix.equals(that.entityIdPrefix) : that.entityIdPrefix != null) return false; if (this.groupConfiguration != null ? !this.groupConfiguration.equals(that.groupConfiguration) : that.groupConfiguration != null) return false; return this.identityTokenOnly != null ? this.identityTokenOnly.equals(that.identityTokenOnly) : that.identityTokenOnly == null; } @Override public final int hashCode() { int result = this.issuer.hashCode(); result = 31 * result + (this.accessTokenOnly != null ? this.accessTokenOnly.hashCode() : 0); result = 31 * result + (this.entityIdPrefix != null ? this.entityIdPrefix.hashCode() : 0); result = 31 * result + (this.groupConfiguration != null ? this.groupConfiguration.hashCode() : 0); result = 31 * result + (this.identityTokenOnly != null ? this.identityTokenOnly.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy