Package com.onec.auth
Class OnecAuthProperties.Oidc
java.lang.Object
com.onec.auth.OnecAuthProperties.Oidc
- Enclosing class:
OnecAuthProperties
OIDC configuration for the
OnecAuthProperties.Mode.OIDC and OnecAuthProperties.Mode.RESOURCE_SERVER modes. The
authentication plumbing is plain Spring Security OAuth2 — the only provider-specific concern
is how token claims map onto Spring authorities, which differs per IdP (Keycloak puts roles
under realm_access.roles; Zitadel under urn:zitadel:iam:org:project:roles,
keyed by role name). A OnecAuthProperties.Provider preset fills sensible defaults; everything can be
overridden explicitly.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRoles()resolved()Applies theOnecAuthProperties.Providerpreset to produce the effective, fully-populated settings the autoconfig andClaimRoleConverterconsume.voidsetLogoutPath(String logoutPath) voidsetPostLogoutRedirectUri(String postLogoutRedirectUri) voidsetPrincipalClaim(String principalClaim) voidsetProvider(OnecAuthProperties.Provider provider) voidsetRegistrationId(String registrationId) voidsetRoles(OnecAuthProperties.Roles roles)
-
Constructor Details
-
Oidc
public Oidc()
-
-
Method Details
-
getProvider
-
setProvider
-
getRegistrationId
-
setRegistrationId
-
getPrincipalClaim
-
setPrincipalClaim
-
getLogoutPath
-
setLogoutPath
-
getPostLogoutRedirectUri
-
setPostLogoutRedirectUri
-
getRoles
-
setRoles
-
resolved
Applies theOnecAuthProperties.Providerpreset to produce the effective, fully-populated settings the autoconfig andClaimRoleConverterconsume. Explicit values always win; preset defaults only fill what was left null/empty. Validates configuration (e.g. Keycloak client-roles without a client-id, or CUSTOM without a registration-id).
-