Class ADInternalHybridUserSource
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.user.UserSourceProfileKernelWrapper
-
- com.inductiveautomation.ignition.gateway.user.AbstractUserSourceProfile
-
- com.inductiveautomation.ignition.gateway.authentication.impl.InternalUserSource
-
- com.inductiveautomation.ignition.gateway.authentication.impl.ADInternalHybridUserSource
-
- All Implemented Interfaces:
SSOCompatibleADUserSource
,UserSourceProfile
,UserSourceProfileKernel
public class ADInternalHybridUserSource extends InternalUserSource implements SSOCompatibleADUserSource
-
-
Field Summary
-
Fields inherited from interface com.inductiveautomation.ignition.gateway.user.UserSourceProfile
PWD_EXPIRATION_BYPASS
-
-
Constructor Summary
Constructors Constructor Description ADInternalHybridUserSource(UserSourceProfileKernel kernel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
alterUser(User user, UICallback ui)
AuthenticatedUser
authenticate(AuthChallenge challenge)
Called to both verify authentication for a given username/password pair, and to find the security roles for that user.AuthenticatedUser
authenticateAD(AuthChallenge challenge)
Callback to the standard, non-SSO version of this user source's auth logicUser
findSSOUser(java.lang.String uname)
Used by the SSO helper in order to search for a user with a given username.protected java.lang.Long
findUserInternalId(PersistenceSession session, User user)
Our superclass stores the internal user id as the User object's id, but we don't.java.util.Set<UserSourceEditCapability>
getEditFlags()
Which of the editing functions are supported?@NotNull java.util.Collection<User>
getUsers()
Retrieve all users from this profile.void
setAllowAnon(boolean anon)
void
setLdapHost(java.lang.String ldapHost)
void
setLdapPort(java.lang.String ldapPort)
void
setListUsersFromAD(boolean listUsersFromAD)
void
setPageSize(int size)
void
setProfilePassword(java.lang.String profilePassword)
void
setProfileUsername(java.lang.String profileUsername)
void
setReadTimeout(java.lang.Long readTimeOut)
void
setSaslConfig(SASLConfig saslConfig)
void
setSecondaryLdapHost(java.lang.String secondaryLdapHost)
void
setSecondaryLdapPort(java.lang.String secondaryLdapPort)
void
setSecurityAuthentication(LDAPHelper.AuthType securityAuthentication)
void
setSecurityProtocol(LDAPHelper.ProtocolType securityProtocol)
void
setSSODomain(java.lang.String ssoDomain)
void
setSSOEnabled(boolean enabled)
void
setUserListFilter(java.lang.String userListFilter)
void
setUserNameAttribute(java.lang.String userNameAttribute)
void
setUsernamePrefix(java.lang.String usernamePrefix)
void
setUsernameSuffix(java.lang.String usernameSuffix)
void
setUserSearchBase(java.lang.String userSearchBase)
void
setUserSearchFilter(java.lang.String userSearchFilter)
void
setUseSSL(boolean useSsl)
void
startup(UserSourceManager manager)
Called when the user source is created before it is used.java.lang.String
toString()
-
Methods inherited from class com.inductiveautomation.ignition.gateway.authentication.impl.InternalUserSource
addRole, addUser, alterPassword, createDefaultUserSource, createFirstUser, getRoles, removeRole, removeUser, renameRole, validatePassword
-
Methods inherited from class com.inductiveautomation.ignition.gateway.user.AbstractUserSourceProfile
getName, getUser
-
Methods inherited from class com.inductiveautomation.ignition.gateway.user.UserSourceProfileKernelWrapper
getCacheValidationTimeout, getContext, getManager, getProfileId, getProfileName, isLockedOut, notifyFailedAttempt, shutdown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.gateway.user.UserSourceProfile
getCacheValidationTimeout, getProfileId, shutdown
-
-
-
-
Constructor Detail
-
ADInternalHybridUserSource
public ADInternalHybridUserSource(UserSourceProfileKernel kernel)
-
-
Method Detail
-
startup
public void startup(UserSourceManager manager)
Description copied from interface:UserSourceProfileKernel
Called when the user source is created before it is used.- Specified by:
startup
in interfaceUserSourceProfile
- Specified by:
startup
in interfaceUserSourceProfileKernel
- Overrides:
startup
in classUserSourceProfileKernelWrapper
-
findUserInternalId
protected java.lang.Long findUserInternalId(PersistenceSession session, User user)
Our superclass stores the internal user id as the User object's id, but we don't. We store the username as the ID. This function looks up the internal database id of a user for the superclass's benefit.- Overrides:
findUserInternalId
in classInternalUserSource
-
alterUser
public void alterUser(User user, UICallback ui) throws java.lang.Exception
- Specified by:
alterUser
in interfaceUserSourceProfile
- Overrides:
alterUser
in classInternalUserSource
- Throws:
java.lang.Exception
-
authenticate
public AuthenticatedUser authenticate(AuthChallenge challenge) throws java.lang.Exception
Description copied from interface:UserSourceProfile
Called to both verify authentication for a given username/password pair, and to find the security roles for that user.- Specified by:
authenticate
in interfaceUserSourceProfile
- Overrides:
authenticate
in classInternalUserSource
- Returns:
- An AuthenticatedUser that contains the user's roles if authentication succeeded, or null if it did not.
- Throws:
java.lang.Exception
-
getUsers
@NotNull public @NotNull java.util.Collection<User> getUsers()
Description copied from interface:UserSourceProfile
Retrieve all users from this profile. This can execute slowly (block) if need be. It will be called periodically by the manager and the results will be cached.- Specified by:
getUsers
in interfaceUserSourceProfile
- Overrides:
getUsers
in classInternalUserSource
-
authenticateAD
public AuthenticatedUser authenticateAD(AuthChallenge challenge) throws java.lang.Exception
Description copied from interface:SSOCompatibleADUserSource
Callback to the standard, non-SSO version of this user source's auth logic- Specified by:
authenticateAD
in interfaceSSOCompatibleADUserSource
- Throws:
java.lang.Exception
-
findSSOUser
public User findSSOUser(java.lang.String uname) throws java.lang.Exception
Description copied from interface:SSOCompatibleADUserSource
Used by the SSO helper in order to search for a user with a given username. Return null if no user with this username is found.- Specified by:
findSSOUser
in interfaceSSOCompatibleADUserSource
- Throws:
java.lang.Exception
-
toString
public java.lang.String toString()
- Overrides:
toString
in classInternalUserSource
-
setListUsersFromAD
public void setListUsersFromAD(boolean listUsersFromAD)
-
setLdapHost
public void setLdapHost(java.lang.String ldapHost)
-
setLdapPort
public void setLdapPort(java.lang.String ldapPort)
-
setSecondaryLdapHost
public void setSecondaryLdapHost(java.lang.String secondaryLdapHost)
-
setSecondaryLdapPort
public void setSecondaryLdapPort(java.lang.String secondaryLdapPort)
-
setUsernamePrefix
public void setUsernamePrefix(java.lang.String usernamePrefix)
-
setUsernameSuffix
public void setUsernameSuffix(java.lang.String usernameSuffix)
-
setProfileUsername
public void setProfileUsername(java.lang.String profileUsername)
-
setReadTimeout
public void setReadTimeout(java.lang.Long readTimeOut)
-
setProfilePassword
public void setProfilePassword(java.lang.String profilePassword)
-
setUseSSL
public void setUseSSL(boolean useSsl)
-
setAllowAnon
public void setAllowAnon(boolean anon)
-
setSecurityAuthentication
public void setSecurityAuthentication(LDAPHelper.AuthType securityAuthentication)
-
setSecurityProtocol
public void setSecurityProtocol(LDAPHelper.ProtocolType securityProtocol)
-
setUserSearchBase
public void setUserSearchBase(java.lang.String userSearchBase)
-
setUserSearchFilter
public void setUserSearchFilter(java.lang.String userSearchFilter)
-
setUserListFilter
public void setUserListFilter(java.lang.String userListFilter)
-
setUserNameAttribute
public void setUserNameAttribute(java.lang.String userNameAttribute)
-
setPageSize
public void setPageSize(int size)
-
setSSOEnabled
public void setSSOEnabled(boolean enabled)
-
setSSODomain
public void setSSODomain(java.lang.String ssoDomain)
-
setSaslConfig
public void setSaslConfig(SASLConfig saslConfig)
-
getEditFlags
public java.util.Set<UserSourceEditCapability> getEditFlags()
Description copied from interface:UserSourceProfile
Which of the editing functions are supported?- Specified by:
getEditFlags
in interfaceUserSourceProfile
- Overrides:
getEditFlags
in classInternalUserSource
-
-