Package de.xima.fc.user
Class UserFactory
- java.lang.Object
-
- de.xima.fc.user.UserFactory
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IUser
anonymous(Collection<BenutzerGruppe> userGroups)
static IUser
forPac4jProfile(org.pac4j.core.profile.UserProfile pac4jProfile)
static IUser
forWebContext(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, IAuthenticationTarget target)
static void
registerConfigProducer(Function<? super IAuthenticationTarget,? extends org.pac4j.core.config.Config> configProducer)
Registers producer for a Pac4JConfig
.static void
registerUserProducer(Function<org.pac4j.core.profile.UserProfile,IUser> userProducer)
static IUser
userForPac4jProfile(org.pac4j.core.profile.UserProfile pac4jProfile)
-
-
-
Method Detail
-
registerUserProducer
public static void registerUserProducer(Function<org.pac4j.core.profile.UserProfile,IUser> userProducer)
-
registerConfigProducer
public static void registerConfigProducer(Function<? super IAuthenticationTarget,? extends org.pac4j.core.config.Config> configProducer)
Registers producer for a Pac4JConfig
. The producer is given theIAuthenticationTarget
. It may return null when it cannot produce a config for the given authentication target. The config of the first producer that returns a non-null value will be used. When no producer returns a config, no config i- Parameters:
configProducer
- producer for a Pac4JConfig
.
-
forWebContext
public static IUser forWebContext(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, IAuthenticationTarget target)
-
forPac4jProfile
public static IUser forPac4jProfile(org.pac4j.core.profile.UserProfile pac4jProfile)
-
userForPac4jProfile
public static IUser userForPac4jProfile(org.pac4j.core.profile.UserProfile pac4jProfile)
-
anonymous
public static IUser anonymous(Collection<BenutzerGruppe> userGroups)
-
-