Package org.opencms.security.twofactor
Class CmsTwoFactorAuthenticationUserPolicy.UserCheckContext
- java.lang.Object
-
- org.opencms.security.twofactor.CmsTwoFactorAuthenticationUserPolicy.UserCheckContext
-
- Enclosing class:
- CmsTwoFactorAuthenticationUserPolicy
protected static class CmsTwoFactorAuthenticationUserPolicy.UserCheckContext extends java.lang.Object
A context object used to keep user-related data around which may be needed by multiple rules, so we only need read it once (e.g. the list of groups of a user).
-
-
Constructor Summary
Constructors Constructor Description UserCheckContext(CmsObject cms, CmsUser user)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>
getGroupNames()
Gets the set of names of the groups the user belongs to.CmsUser
getUser()
Gets the user.
-
-
-
Constructor Detail
-
UserCheckContext
public UserCheckContext(CmsObject cms, CmsUser user)
Creates a new instance.- Parameters:
cms
- the CMS contextuser
- the user
-
-
Method Detail
-
getGroupNames
public java.util.Set<java.lang.String> getGroupNames() throws CmsException
Gets the set of names of the groups the user belongs to.- Returns:
- the set of group names
- Throws:
CmsException
- if initializing the groups fails
-
-