Class AuthInfo
- All Implemented Interfaces:
IPrincipalData
,IAuthInfo
,Serializable
,Cloneable
,Map<String,
Object>
public abstract class AuthInfo
extends HashMap<String,Object>
implements IAuthInfo, IPrincipalData, Serializable, Cloneable
AuthInfo is a bean that manages some simple authentication information describing the current user.
This includes whether the user is anonymous, authenticated, what the userID is etc...
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Deprecated.static final String
Deprecated.useIAuthInfo.IDSUSER
insteadstatic final String
Deprecated.useIAuthInfo.PORTAL_USER
insteadstatic final String
Deprecated.useIAuthInfo.REMOTEADDR
insteadstatic final String
Deprecated.useIAuthInfo.SESSION_ID
insteadstatic final String
Deprecated.useIAuthInfo.SSO_CAPABLE
insteadstatic final String
Deprecated.useIAuthInfo.UNKNOWN_TYPE
insteadstatic final String
Deprecated.useIAuthInfo.USERS
insteadFields inherited from interface com.webmethods.portal.bizPolicy.IPrincipalData
ID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthInfo
getAuthInfo
(HttpSession session) Helper function to retrieve the authorization information for the current sessionstatic IThingID
getUserID
(HttpSession session) Convience method to get the user id.static boolean
isAdminSession
(HttpSession session) Helper function to determine if the given session is an Admin sessionstatic boolean
isGuestSession
(HttpSession session) Helper function to determine if the given session is a Guest sessionstatic boolean
isSessionValid
(HttpSession session) Determines if a given session is valid.static void
setAuthInfo
(HttpSession session, IAuthInfo authInfo) Helper function to set the AuthInfo information on the given sessiontoString()
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.webmethods.portal.framework.auth.IAuthInfo
copy, getAuthType, getRemoteAddr, getSessionID, getSessionState, setAuthType, setRemoteAddr, setSessionID
Methods inherited from interface com.webmethods.portal.bizPolicy.IPrincipalData
getDN, getDomain, getDomainUserName, getPassword, getUri, getUserDirectoryURI, getUserID, getUserName, isAdminSession, isAnonymous, isAuthenticated, isLoginSession, isPrivilegedInfo, setAuthentication, setDN, setDomain, setInfo, setIsAdminSession, setIsAnonymous, setIsLoginSession, setIsPrivilegedInfo, setUri, setUserID, setUserName
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Field Details
-
UNKNOWN_TYPE
Deprecated.useIAuthInfo.UNKNOWN_TYPE
instead- See Also:
-
USERS
Deprecated.useIAuthInfo.USERS
instead- See Also:
-
IDSUSER
Deprecated.useIAuthInfo.IDSUSER
instead- See Also:
-
REMOTEADDR
Deprecated.useIAuthInfo.REMOTEADDR
instead- See Also:
-
SESSION_ID
Deprecated.useIAuthInfo.SESSION_ID
instead- See Also:
-
PORTAL_USER
Deprecated.useIAuthInfo.PORTAL_USER
instead- See Also:
-
ANONYMOUS_AUTH_TYPE
Deprecated.useIAuthInfo.ANONYMOUS_AUTH_TYPE
instead- See Also:
-
SSO_CAPABLE
Deprecated.useIAuthInfo.SSO_CAPABLE
instead- See Also:
-
-
Constructor Details
-
AuthInfo
protected AuthInfo(int initialAuthSize)
-
-
Method Details
-
getAuthInfo
Helper function to retrieve the authorization information for the current session- Parameters:
session
- the HttpSession to retrieve the AuthInfo from- Returns:
- the AuthInfo information for the given session
- See Also:
-
setAuthInfo
Helper function to set the AuthInfo information on the given session- Parameters:
session
- the HttpSession to set the AuthInfo ontoauthInfo
- the AuthInfo object to set- See Also:
-
isAdminSession
Helper function to determine if the given session is an Admin session- Parameters:
session
- the HttpSession to examine- Returns:
- true if the session is an admin session, false otherwise
-
isGuestSession
Helper function to determine if the given session is a Guest session- Parameters:
session
- the HttpSession to examine- Returns:
- true if the session is a guest session, false otherwise
-
isSessionValid
Determines if a given session is valid. A valid session contains an AuthInfo object with theisAuthValidated ()
option set to true- Parameters:
session
- the HttpSession to validate- Returns:
- true if session is valid, false otherwise
-
getUserID
Convience method to get the user id.- Parameters:
session
- is the current HttpSession containing the authinfo object- Returns:
- the current user ID or NULL if not found
-
toString
- Overrides:
toString
in classAbstractMap<String,
Object>
-
IAuthInfo.ANONYMOUS_AUTH_TYPE
instead