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 final SessionInterface getSession()
getSession
in interface AuthInterface
public final NextCommandReply setUser(String user)
setUser
in interface AuthInterface
user
- the user to setpublic final String getUser()
getUser
in interface AuthInterface
public final NextCommandReply setPassword(String password)
setPassword
in interface AuthInterface
password
- the password to setpublic final boolean isIdentified()
AuthInterface
isIdentified
in interface AuthInterface
public final boolean isAdmin()
isAdmin
in interface AuthInterface
public final boolean isBusinessPathValid(String newPath)
AuthInterface
isBusinessPathValid
in interface AuthInterface
public final String getBusinessPath()
AuthInterface
getBusinessPath
in interface AuthInterface
public final String getBaseDirectory()
AuthInterface
getBaseDirectory
in interface AuthInterface
public final String getRelativePath(String file)
AuthInterface
getRelativePath
in interface AuthInterface
file
- (full path with mount point)public final void clear()
AuthInterface
clear
in interface AuthInterface
public final String getAccount()
getAccount
in interface HttpAuthInterface
public final NextCommandReply setAccount(String account)
setAccount
in interface HttpAuthInterface
account
- the account to setpublic final CommandExecutorInterface getCommandExecutor()
getCommandExecutor
in interface HttpAuthInterface
Copyright © 2009–2022 Waarp. All rights reserved.