Class OidcClient.OidcClientBuilder
java.lang.Object
swiss.trustbroker.federation.xmlconfig.OidcClient.OidcClientBuilder
- Enclosing class:
OidcClient
-
Method Summary
Modifier and TypeMethodDescriptionOIDC allowed audience in TokenExchange.authorizationGrantTypes(AuthorizationGrantTypes authorizationGrantTypes) Authorization grant types to be allowed.build()certificates(Certificates certificates) Required for JWT encryptionclaimsSelection(AttributesSelection claimsSelection) Attribute selection applied to the claims.claimsSources(OidcClaimsSources claimsSources) Sources of claims for OIDC CPs.clientAuthenticationMethods(ClientAuthenticationMethods clientAuthenticationMethods) Client authentication methods to be allowed.clientEncryptionCredential(org.opensaml.security.credential.Credential clientEncryptionCredential) clientSecret(String clientSecret) You can encode the secret with one of the supported encoders.federationId(String federationId) Federation ID override.Client ID.CP issuer ID override forissclaim validation.oidcSecurityPolicies(OidcSecurityPolicies oidcSecurityPolicies) Override security policies.protocolEndpoints(ProtocolEndpoints protocolEndpoints) OpenID endpoints a single CP side OIDC client uses for federated login.QoAs to use.Optional support to be able to map back /oauth2/authorizeredirectUris(AcWhitelist redirectUris) Permitted redirect URLs for this client.registeredClient(org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient) OIDC allowed resources in TokenExchange.responseMode(ResponseMode responseMode) Response mode to be requested from CP.OIDC scopes to be used.toString()Legacy Policy Enforcement Point (PEP) QOA mapping policy.
-
Method Details
-
id
Client ID.
Notes:- OIDC client IDs must be unique for all RPs within the configuration of each environment
(
trustbroker-inventories/environment). - OIDC client IDs used for CPs may overlap both across CPs and with those of RPs.
- Returns:
this.
- OIDC client IDs must be unique for all RPs within the configuration of each environment
(
-
federationId
Federation ID override.
Fallback to RP ID.- Returns:
this.
-
issuerId
CP issuer ID override forissclaim validation.
Fallback to CP ID.- Returns:
this.- Since:
- 1.10.0
-
realm
Optional support to be able to map back /oauth2/authorize- Returns:
this.
-
usePepQoa
Legacy Policy Enforcement Point (PEP) QOA mapping policy.
Fallback: Global defaultUsePepQoaPolicy- Returns:
this.
-
protocolEndpoints
OpenID endpoints a single CP side OIDC client uses for federated login.- Returns:
this.- Since:
- 1.9.0
-
redirectUris
Permitted redirect URLs for this client.- Returns:
this.
-
certificates
Required for JWT encryption- Returns:
this.
-
clientSecret
You can encode the secret with one of the supported encoders. See the provided exampleEncodePassword.groovyfor how to encode a password using Argon2.- Returns:
this.- See Also:
-
oidcSecurityPolicies
Override security policies.- Returns:
this.
-
authorizationGrantTypes
public OidcClient.OidcClientBuilder authorizationGrantTypes(AuthorizationGrantTypes authorizationGrantTypes) Authorization grant types to be allowed.
Default: authorization_code, refresh_token- Returns:
this.
-
clientAuthenticationMethods
public OidcClient.OidcClientBuilder clientAuthenticationMethods(ClientAuthenticationMethods clientAuthenticationMethods) Client authentication methods to be allowed.
Default: none, client_secret_basic, client_secret_post- Returns:
this.
-
scopes
OIDC scopes to be used.
Default: openid, profile, email, address, phone- Returns:
this.
-
audiences
OIDC allowed audience in TokenExchange.- Returns:
this.- Since:
- 1.13.0
-
resources
OIDC allowed resources in TokenExchange.- Returns:
this.- Since:
- 1.13.0
-
responseMode
Response mode to be requested from CP.
Default: form_post- Returns:
this.- Since:
- 1.10.0
-
qoa
QoAs to use.- Returns:
this.
-
claimsSelection
Attribute selection applied to the claims.- Returns:
this.
-
claimsSources
Sources of claims for OIDC CPs.
Default: id_token- Returns:
this.- Since:
- 1.10.0
-
registeredClient
public OidcClient.OidcClientBuilder registeredClient(org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient) - Returns:
this.
-
clientEncryptionCredential
public OidcClient.OidcClientBuilder clientEncryptionCredential(org.opensaml.security.credential.Credential clientEncryptionCredential) - Returns:
this.
-
cpJwks
- Returns:
this.
-
build
-
toString
-