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 AuthInterface
public NextCommandReply setUser(String user) throws Reply421Exception, Reply530Exception
setUser
in interface AuthInterface
user
- 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 AuthInterface
public NextCommandReply setPassword(String password) throws Reply421Exception, Reply530Exception
setPassword
in interface AuthInterface
password
- the password to setReply421Exception
- if there is a problem during the
authenticationReply530Exception
- if there is a problem during the
authenticationpublic boolean isIdentified()
AuthInterface
isIdentified
in interface AuthInterface
public boolean isAdmin()
isAdmin
in interface AuthInterface
public boolean isBusinessPathValid(String newPath)
AuthInterface
isBusinessPathValid
in interface AuthInterface
public String getBusinessPath()
AuthInterface
getBusinessPath
in interface AuthInterface
public String getBaseDirectory()
AuthInterface
getBaseDirectory
in interface AuthInterface
public String getRelativePath(String file)
AuthInterface
getRelativePath
in interface AuthInterface
file
- (full path with mount point)public void clear()
AuthInterface
clear
in interface AuthInterface
public String getAccount()
getAccount
in interface HttpAuthInterface
public NextCommandReply setAccount(String account) throws Reply421Exception, Reply530Exception, Reply502Exception
setAccount
in interface HttpAuthInterface
account
- the account to setReply421Exception
- if there is a problem during the
authenticationReply530Exception
- if there is a problem during the
authenticationReply502Exception
public CommandExecutorInterface getCommandExecutor()
getCommandExecutor
in interface HttpAuthInterface
Copyright © 2009–2020 Waarp. All rights reserved.