
public class DefaultHttpAuth extends Object implements HttpAuthInterface
If an authentication is needed, then it will have to use an implementation compatible with the Security of the IT that needs it.
| Modifier and Type | Field and Description |
|---|---|
protected String |
account
Account name
|
protected boolean |
isIdentified
Is Identified
|
protected String |
password
Password
|
protected SessionInterface |
session
SessionInterface
|
protected String |
user
User name
|
| Constructor and Description |
|---|
DefaultHttpAuth(SessionInterface session) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clean object
|
String |
getAccount() |
String |
getBaseDirectory()
Return the mount point
|
String |
getBusinessPath()
Return the relative path for this account according to the Business
(without true root of mount).
|
CommandExecutorInterface |
getCommandExecutor() |
String |
getRelativePath(String file)
Return the relative path from a file (without mount point)
|
SessionInterface |
getSession() |
String |
getUser() |
boolean |
isAdmin() |
boolean |
isBusinessPathValid(String newPath)
Is the given complete relative Path valid from Authentication/Business
point of view.
|
boolean |
isIdentified()
Is the current Authentication OK for full identification.
|
NextCommandReply |
setAccount(String account) |
NextCommandReply |
setPassword(String password) |
NextCommandReply |
setUser(String user) |
protected String user
protected String password
protected String account
protected final boolean isIdentified
protected final SessionInterface session
public DefaultHttpAuth(SessionInterface session)
session - public SessionInterface getSession()
getSession in interface AuthInterfacepublic NextCommandReply setUser(String user) throws Reply421Exception, Reply530Exception
setUser in interface AuthInterfaceuser - the user to setReply421Exception - if there is a problem during the
authenticationReply530Exception - if there is a problem during the
authenticationpublic String getUser()
getUser in interface AuthInterfacepublic NextCommandReply setPassword(String password) throws Reply421Exception, Reply530Exception
setPassword in interface AuthInterfacepassword - the password to setReply421Exception - if there is a problem during the
authenticationReply530Exception - if there is a problem during the
authenticationpublic boolean isIdentified()
AuthInterfaceisIdentified in interface AuthInterfacepublic boolean isAdmin()
isAdmin in interface AuthInterfacepublic boolean isBusinessPathValid(String newPath)
AuthInterfaceisBusinessPathValid in interface AuthInterfacepublic String getBusinessPath()
AuthInterfacegetBusinessPath in interface AuthInterfacepublic String getBaseDirectory()
AuthInterfacegetBaseDirectory in interface AuthInterfacepublic String getRelativePath(String file)
AuthInterfacegetRelativePath in interface AuthInterfacefile - (full path with mount point)public void clear()
AuthInterfaceclear in interface AuthInterfacepublic String getAccount()
getAccount in interface HttpAuthInterfacepublic NextCommandReply setAccount(String account) throws Reply421Exception, Reply530Exception, Reply502Exception
setAccount in interface HttpAuthInterfaceaccount - the account to setReply421Exception - if there is a problem during the
authenticationReply530Exception - if there is a problem during the
authenticationReply502Exceptionpublic CommandExecutorInterface getCommandExecutor()
getCommandExecutor in interface HttpAuthInterfaceCopyright © 2009–2020 Waarp. All rights reserved.