Class UserAuthProvider
- java.lang.Object
-
- net.webpdf.wsclient.session.auth.AbstractAuthenticationProvider
-
- net.webpdf.wsclient.session.auth.UserAuthProvider
-
- All Implemented Interfaces:
AuthProvider
public class UserAuthProvider extends AbstractAuthenticationProvider
An instance of
UserAuthProvidershall provideUsernamePasswordCredentialsfor the authentication of a webPDF user.Be aware: Currently an
UserAuthProvidershall only serve oneSessionat a time. AnUserAuthProviderbeing called by anotherSessionthan it´s current master, shall assume it´s current master to have expired and shall, try to reauthorize that newSession(new master).
For that reason anUserAuthProviders shall be reusable by subsequentSessions.Be aware: However - An implementation of
AuthProvideris not required to serve multipleSessions at a time. It is expected to create a newAuthProviderfor each existingSession.
-
-
Constructor Summary
Constructors Constructor Description UserAuthProvider(@NotNull String userName, char @NotNull [] password)Creates a newUserAuthProviderprovider for the given userName and password.
Be aware: The given values may not be empty.UserAuthProvider(@NotNull String userName, char @NotNull [] password, AuthMaterial authMaterial)Resumes an existing authentication provider, that shall resume aSessionwith theAuthMaterialprovided.UserAuthProvider(@NotNull String userName, @NotNull String password)Creates a newUserAuthProviderfor the given userName and password.
Be aware: The given values may not be empty.UserAuthProvider(@NotNull String userName, @NotNull String password, AuthMaterial authMaterial)Resumes an existing authentication provider, that shall resume aSessionwith theAuthMaterialprovided.
-
Method Summary
-
Methods inherited from class net.webpdf.wsclient.session.auth.AbstractAuthenticationProvider
getAuthMaterial, getInitialAuthMaterial, getSession, login, provide, refresh, setAuthMaterial
-
-
-
-
Constructor Detail
-
UserAuthProvider
public UserAuthProvider(@NotNull @NotNull String userName, @NotNull @NotNull String password) throws ResultExceptionCreates a new
UserAuthProviderfor the given userName and password.
Be aware: The given values may not be empty. Use theAnonymousAuthProviderto create anonymousSessions.Be aware: Currently an
UserAuthProvidershall only serve oneSessionat a time. AnUserAuthProviderbeing called by anotherSessionthan it´s current master, shall assume it´s current master to have expired and shall, try to reauthorize that newSession(new master).
For that reason anUserAuthProviders shall be reusable by subsequentSessions.- Parameters:
userName- The name of the user to authenticate.password- The password of the user to authenticate.- Throws:
ResultException
-
UserAuthProvider
public UserAuthProvider(@NotNull @NotNull String userName, @NotNull @NotNull String password, AuthMaterial authMaterial) throws ResultExceptionResumes an existing authentication provider, that shall resume a
Sessionwith theAuthMaterialprovided.Be aware: Currently an
UserAuthProvidershall only serve oneSessionat a time. AnUserAuthProviderbeing called by anotherSessionthan it´s current master, shall assume it´s current master to have expired and shall, try to reauthorize that newSession(new master).
For that reason anUserAuthProviders shall be reusable by subsequentSessions.- Parameters:
userName- The name of the user to authenticate.password- The password of the user to authenticate.authMaterial- TheAuthMaterialto resume theSessionwith.- Throws:
ResultException
-
UserAuthProvider
public UserAuthProvider(@NotNull @NotNull String userName, char @NotNull [] password) throws ResultExceptionCreates a new
UserAuthProviderprovider for the given userName and password.
Be aware: The given values may not be empty. Use theAnonymousAuthProviderto create anonymousSessions.Be aware: Currently an
UserAuthProvidershall only serve oneSessionat a time. AnUserAuthProviderbeing called by anotherSessionthan it´s current master, shall assume it´s current master to have expired and shall, try to reauthorize that newSession(new master).
For that reason anUserAuthProviders shall be reusable by subsequentSessions.- Parameters:
userName- The name of the user to authenticate.password- The password of the user to authenticate.- Throws:
ResultException
-
UserAuthProvider
public UserAuthProvider(@NotNull @NotNull String userName, char @NotNull [] password, AuthMaterial authMaterial) throws ResultExceptionResumes an existing authentication provider, that shall resume a
Sessionwith theAuthMaterialprovided.Be aware: Currently an
UserAuthProvidershall only serve oneSessionat a time. AnUserAuthProviderbeing called by anotherSessionthan it´s current master, shall assume it´s current master to have expired and shall, try to reauthorize that newSession(new master).
For that reason anUserAuthProviders shall be reusable by subsequentSessions.- Parameters:
userName- The name of the user to authenticate.password- The password of the user to authenticate.authMaterial- TheAuthMaterialto resume theSessionwith.- Throws:
ResultException
-
-