Class OidcUserProvider
java.lang.Object
io.fluxzero.idp.bff.OidcUserProvider
- All Implemented Interfaces:
io.fluxzero.sdk.tracking.handling.authentication.RefreshingUserProvider<io.fluxzero.sdk.tracking.handling.authentication.User>, io.fluxzero.sdk.tracking.handling.authentication.UserProvider
public final class OidcUserProvider
extends Object
implements io.fluxzero.sdk.tracking.handling.authentication.RefreshingUserProvider<io.fluxzero.sdk.tracking.handling.authentication.User>
Resolves browser requests through the registered
OidcIntegration. The application maps the
verified identity claims to its own User (for example Sender), including current status and roles.
Internal messages, user-ID lookup and system identity retain the supplied provider's behavior.
Register this wrapper as the application's UserProvider before building Fluxzero; construction
does not require a Fluxzero instance, Spring, issuer discovery or key access.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordClaims from the validated ID token in the encrypted session; never implied application roles. -
Field Summary
Fields inherited from interface io.fluxzero.sdk.tracking.handling.authentication.UserProvider
defaultUserProvider -
Constructor Summary
ConstructorsConstructorDescriptionOidcUserProvider(io.fluxzero.sdk.tracking.handling.authentication.UserProvider delegate, BiFunction<OidcUserProvider.Identity, io.fluxzero.sdk.web.WebRequest, ? extends io.fluxzero.sdk.tracking.handling.authentication.User> mapper) Also supplies the request for application policies such as explicitly authorized impersonation.OidcUserProvider(io.fluxzero.sdk.tracking.handling.authentication.UserProvider delegate, Function<OidcUserProvider.Identity, ? extends io.fluxzero.sdk.tracking.handling.authentication.User> mapper) -
Method Summary
Modifier and TypeMethodDescriptionio.fluxzero.common.api.MetadataaddToMetadata(io.fluxzero.common.api.Metadata metadata, io.fluxzero.sdk.tracking.handling.authentication.User user, boolean ifAbsent) booleancontainsUser(io.fluxzero.common.api.Metadata metadata) io.fluxzero.sdk.tracking.handling.authentication.UserfromMessage(io.fluxzero.sdk.common.HasMessage message) static io.fluxzero.sdk.tracking.handling.authentication.UserProviderUses the application's service-loaded mapper and existing service-loaded providers.static io.fluxzero.sdk.tracking.handling.authentication.UserProviderfromServiceLoader(io.fluxzero.sdk.tracking.handling.authentication.UserProvider existing) Adds the service-loaded mapper to an existing provider.io.fluxzero.sdk.tracking.handling.authentication.Userio.fluxzero.sdk.tracking.handling.authentication.Userio.fluxzero.sdk.tracking.handling.authentication.UsergetUserById(Object userId) io.fluxzero.sdk.tracking.handling.authentication.UserrefreshUser(io.fluxzero.sdk.tracking.handling.authentication.User user, io.fluxzero.sdk.common.HasMessage message) io.fluxzero.common.api.MetadataremoveFromMetadata(io.fluxzero.common.api.Metadata metadata) booleanMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.fluxzero.sdk.tracking.handling.authentication.UserProvider
addToMetadata, andThen
-
Constructor Details
-
OidcUserProvider
public OidcUserProvider(io.fluxzero.sdk.tracking.handling.authentication.UserProvider delegate, Function<OidcUserProvider.Identity, ? extends io.fluxzero.sdk.tracking.handling.authentication.User> mapper) -
OidcUserProvider
public OidcUserProvider(io.fluxzero.sdk.tracking.handling.authentication.UserProvider delegate, BiFunction<OidcUserProvider.Identity, io.fluxzero.sdk.web.WebRequest, ? extends io.fluxzero.sdk.tracking.handling.authentication.User> mapper) Also supplies the request for application policies such as explicitly authorized impersonation.
-
-
Method Details
-
fromServiceLoader
public static io.fluxzero.sdk.tracking.handling.authentication.UserProvider fromServiceLoader()Uses the application's service-loaded mapper and existing service-loaded providers. -
fromServiceLoader
public static io.fluxzero.sdk.tracking.handling.authentication.UserProvider fromServiceLoader(io.fluxzero.sdk.tracking.handling.authentication.UserProvider existing) Adds the service-loaded mapper to an existing provider. With no mapper, the provider is returned unchanged. Explicit Authorization headers keep using the existing provider; cookie requests never fall back to it. The application'sfluxzero.auth.oidc.disabledproperty restores the existing provider for all requests. Discovery is scoped to this call's context class loader, without a process-wide mapper cache. -
fromMessage
public io.fluxzero.sdk.tracking.handling.authentication.User fromMessage(io.fluxzero.sdk.common.HasMessage message) - Specified by:
fromMessagein interfaceio.fluxzero.sdk.tracking.handling.authentication.UserProvider
-
getActiveUser
public io.fluxzero.sdk.tracking.handling.authentication.User getActiveUser()- Specified by:
getActiveUserin interfaceio.fluxzero.sdk.tracking.handling.authentication.UserProvider
-
requiresMessageBasedLocalResolution
public boolean requiresMessageBasedLocalResolution()- Specified by:
requiresMessageBasedLocalResolutionin interfaceio.fluxzero.sdk.tracking.handling.authentication.UserProvider
-
getUserById
- Specified by:
getUserByIdin interfaceio.fluxzero.sdk.tracking.handling.authentication.UserProvider
-
getSystemUser
public io.fluxzero.sdk.tracking.handling.authentication.User getSystemUser()- Specified by:
getSystemUserin interfaceio.fluxzero.sdk.tracking.handling.authentication.UserProvider
-
containsUser
public boolean containsUser(io.fluxzero.common.api.Metadata metadata) - Specified by:
containsUserin interfaceio.fluxzero.sdk.tracking.handling.authentication.UserProvider
-
removeFromMetadata
public io.fluxzero.common.api.Metadata removeFromMetadata(io.fluxzero.common.api.Metadata metadata) - Specified by:
removeFromMetadatain interfaceio.fluxzero.sdk.tracking.handling.authentication.UserProvider
-
addToMetadata
public io.fluxzero.common.api.Metadata addToMetadata(io.fluxzero.common.api.Metadata metadata, io.fluxzero.sdk.tracking.handling.authentication.User user, boolean ifAbsent) - Specified by:
addToMetadatain interfaceio.fluxzero.sdk.tracking.handling.authentication.UserProvider
-
refreshUser
public io.fluxzero.sdk.tracking.handling.authentication.User refreshUser(io.fluxzero.sdk.tracking.handling.authentication.User user, io.fluxzero.sdk.common.HasMessage message) - Specified by:
refreshUserin interfaceio.fluxzero.sdk.tracking.handling.authentication.RefreshingUserProvider<io.fluxzero.sdk.tracking.handling.authentication.User>
-