Class OidcClient
java.lang.Object
swiss.trustbroker.federation.xmlconfig.OidcClient
- All Implemented Interfaces:
Serializable
OIDC client application configuration.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionOidcClient(String id, String federationId, String issuerId, String realm, String usePepQoa, ProtocolEndpoints protocolEndpoints, AcWhitelist redirectUris, Certificates certificates, String clientSecret, OidcSecurityPolicies oidcSecurityPolicies, AuthorizationGrantTypes authorizationGrantTypes, ClientAuthenticationMethods clientAuthenticationMethods, Scopes scopes, Audiences audiences, Resources resources, ResponseMode responseMode, Qoa qoa, AttributesSelection claimsSelection, OidcClaimsSources claimsSources, org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient, org.opensaml.security.credential.Credential clientEncryptionCredential, List<com.nimbusds.jose.jwk.JWK> cpJwks) Creates a newOidcClientinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic OidcClient.OidcClientBuilderbuilder()protected booleanbooleanOIDC allowed audience in TokenExchange.Authorization grant types to be allowed.Required for JWT encryptionAttribute selection applied to the claims.Sources of claims for OIDC CPs.Client authentication methods to be allowed.org.opensaml.security.credential.CredentialYou can encode the secret with one of the supported encoders.List<com.nimbusds.jose.jwk.JWK> Federation ID override.getId()Client ID.CP issuer ID override forissclaim validation.Override security policies.OpenID endpoints a single CP side OIDC client uses for federated login.getQoa()QoAs to use.getRealm()Optional support to be able to map back /oauth2/authorizePermitted redirect URLs for this client.org.springframework.security.oauth2.server.authorization.client.RegisteredClientOIDC allowed resources in TokenExchange.Response mode to be requested from CP.OIDC scopes to be used.Legacy Policy Enforcement Point (PEP) QOA mapping policy.inthashCode()booleanbooleanisSameRealm(String incomingRealm) booleanisTrustedOrigin(String origin) booleanisValidRedirectUri(String requestedRedirectUri) booleanisValidRedirectUris(List<String> requestedRedirectUris) voidsetAudiences(Audiences audiences) OIDC allowed audience in TokenExchange.voidsetAuthorizationGrantTypes(AuthorizationGrantTypes authorizationGrantTypes) Authorization grant types to be allowed.voidsetCertificates(Certificates certificates) Required for JWT encryptionvoidsetClaimsSelection(AttributesSelection claimsSelection) Attribute selection applied to the claims.voidsetClaimsSources(OidcClaimsSources claimsSources) Sources of claims for OIDC CPs.voidsetClientAuthenticationMethods(ClientAuthenticationMethods clientAuthenticationMethods) Client authentication methods to be allowed.voidsetClientEncryptionCredential(org.opensaml.security.credential.Credential clientEncryptionCredential) voidsetClientSecret(String clientSecret) You can encode the secret with one of the supported encoders.voidvoidsetFederationId(String federationId) Federation ID override.voidClient ID.voidsetIssuerId(String issuerId) CP issuer ID override forissclaim validation.voidsetOidcSecurityPolicies(OidcSecurityPolicies oidcSecurityPolicies) Override security policies.voidsetProtocolEndpoints(ProtocolEndpoints protocolEndpoints) OpenID endpoints a single CP side OIDC client uses for federated login.voidQoAs to use.voidOptional support to be able to map back /oauth2/authorizevoidsetRedirectUris(AcWhitelist redirectUris) Permitted redirect URLs for this client.voidsetRegisteredClient(org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient) voidsetResources(Resources resources) OIDC allowed resources in TokenExchange.voidsetResponseMode(ResponseMode responseMode) Response mode to be requested from CP.voidOIDC scopes to be used.voidsetUsePepQoa(String usePepQoa) Legacy Policy Enforcement Point (PEP) QOA mapping policy.toString()booleanuseClaimsFromSource(OidcClaimsSource claimsSource) booleanuseClaimsFromSourceThat(Predicate<OidcClaimsSource> predicate)
-
Constructor Details
-
OidcClient
public OidcClient() -
OidcClient
public OidcClient(String id, String federationId, String issuerId, String realm, String usePepQoa, ProtocolEndpoints protocolEndpoints, AcWhitelist redirectUris, Certificates certificates, String clientSecret, OidcSecurityPolicies oidcSecurityPolicies, AuthorizationGrantTypes authorizationGrantTypes, ClientAuthenticationMethods clientAuthenticationMethods, Scopes scopes, Audiences audiences, Resources resources, ResponseMode responseMode, Qoa qoa, AttributesSelection claimsSelection, OidcClaimsSources claimsSources, org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient, org.opensaml.security.credential.Credential clientEncryptionCredential, List<com.nimbusds.jose.jwk.JWK> cpJwks) Creates a newOidcClientinstance.- Parameters:
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.
- OIDC client IDs must be unique for all RPs within the configuration of each environment
(
federationId- Federation ID override.
Fallback to RP ID.issuerId- CP issuer ID override forissclaim validation.
Fallback to CP ID.realm- Optional support to be able to map back /oauth2/authorizeusePepQoa- Legacy Policy Enforcement Point (PEP) QOA mapping policy.
Fallback: Global defaultUsePepQoaPolicyprotocolEndpoints- OpenID endpoints a single CP side OIDC client uses for federated login.redirectUris- Permitted redirect URLs for this client.certificates- Required for JWT encryptionclientSecret- You can encode the secret with one of the supported encoders. See the provided exampleEncodePassword.groovyfor how to encode a password using Argon2.oidcSecurityPolicies- Override security policies.authorizationGrantTypes- Authorization grant types to be allowed.
Default: authorization_code, refresh_tokenclientAuthenticationMethods- Client authentication methods to be allowed.
Default: none, client_secret_basic, client_secret_postscopes- OIDC scopes to be used.
Default: openid, profile, email, address, phoneaudiences- OIDC allowed audience in TokenExchange.resources- OIDC allowed resources in TokenExchange.responseMode- Response mode to be requested from CP.
Default: form_postqoa- QoAs to use.claimsSelection- Attribute selection applied to the claims.claimsSources- Sources of claims for OIDC CPs.
Default: id_tokenregisteredClient-clientEncryptionCredential-cpJwks-- Since:
- 1.10.0, 1.9.0, 1.13.0, 1.13.0, 1.10.0, 1.10.0
- See Also:
-
-
Method Details
-
isValidRedirectUri
-
isValidRedirectUris
-
isTrustedOrigin
-
isSameRealm
-
getQoaConfig
-
hasScopes
public boolean hasScopes() -
useClaimsFromSource
-
useClaimsFromSourceThat
-
builder
-
getId
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.
- OIDC client IDs must be unique for all RPs within the configuration of each environment
(
-
getFederationId
Federation ID override.
Fallback to RP ID. -
getIssuerId
CP issuer ID override forissclaim validation.
Fallback to CP ID.- Since:
- 1.10.0
-
getRealm
Optional support to be able to map back /oauth2/authorize -
getUsePepQoa
Legacy Policy Enforcement Point (PEP) QOA mapping policy.
Fallback: Global defaultUsePepQoaPolicy -
getProtocolEndpoints
OpenID endpoints a single CP side OIDC client uses for federated login.- Since:
- 1.9.0
-
getRedirectUris
Permitted redirect URLs for this client. -
getCertificates
Required for JWT encryption -
getClientSecret
You can encode the secret with one of the supported encoders. See the provided exampleEncodePassword.groovyfor how to encode a password using Argon2.- See Also:
-
getOidcSecurityPolicies
Override security policies. -
getAuthorizationGrantTypes
Authorization grant types to be allowed.
Default: authorization_code, refresh_token -
getClientAuthenticationMethods
Client authentication methods to be allowed.
Default: none, client_secret_basic, client_secret_post -
getScopes
OIDC scopes to be used.
Default: openid, profile, email, address, phone -
getAudiences
OIDC allowed audience in TokenExchange.- Since:
- 1.13.0
-
getResources
OIDC allowed resources in TokenExchange.- Since:
- 1.13.0
-
getResponseMode
Response mode to be requested from CP.
Default: form_post- Since:
- 1.10.0
-
getQoa
QoAs to use. -
getClaimsSelection
Attribute selection applied to the claims. -
getClaimsSources
Sources of claims for OIDC CPs.
Default: id_token- Since:
- 1.10.0
-
getRegisteredClient
public org.springframework.security.oauth2.server.authorization.client.RegisteredClient getRegisteredClient() -
getClientEncryptionCredential
public org.opensaml.security.credential.Credential getClientEncryptionCredential() -
getCpJwks
-
setId
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.
- OIDC client IDs must be unique for all RPs within the configuration of each environment
(
-
setFederationId
Federation ID override.
Fallback to RP ID. -
setIssuerId
CP issuer ID override forissclaim validation.
Fallback to CP ID.- Since:
- 1.10.0
-
setRealm
Optional support to be able to map back /oauth2/authorize -
setUsePepQoa
Legacy Policy Enforcement Point (PEP) QOA mapping policy.
Fallback: Global defaultUsePepQoaPolicy -
setProtocolEndpoints
OpenID endpoints a single CP side OIDC client uses for federated login.- Since:
- 1.9.0
-
setRedirectUris
Permitted redirect URLs for this client. -
setCertificates
Required for JWT encryption -
setClientSecret
You can encode the secret with one of the supported encoders. See the provided exampleEncodePassword.groovyfor how to encode a password using Argon2.- See Also:
-
setOidcSecurityPolicies
Override security policies. -
setAuthorizationGrantTypes
Authorization grant types to be allowed.
Default: authorization_code, refresh_token -
setClientAuthenticationMethods
Client authentication methods to be allowed.
Default: none, client_secret_basic, client_secret_post -
setScopes
OIDC scopes to be used.
Default: openid, profile, email, address, phone -
setAudiences
OIDC allowed audience in TokenExchange.- Since:
- 1.13.0
-
setResources
OIDC allowed resources in TokenExchange.- Since:
- 1.13.0
-
setResponseMode
Response mode to be requested from CP.
Default: form_post- Since:
- 1.10.0
-
setQoa
QoAs to use. -
setClaimsSelection
Attribute selection applied to the claims. -
setClaimsSources
Sources of claims for OIDC CPs.
Default: id_token- Since:
- 1.10.0
-
setRegisteredClient
public void setRegisteredClient(org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient) -
setClientEncryptionCredential
public void setClientEncryptionCredential(org.opensaml.security.credential.Credential clientEncryptionCredential) -
setCpJwks
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-