|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserAuth
User authentication API. See RFC 4252.
Method Summary | |
---|---|
void |
authenticate(String username,
Service nextService,
Iterable<AuthMethod> methods)
Attempt to authenticate username using each of methods in order. |
String |
getBanner()
Returns the authentication banner (if any). |
Deque<UserAuthException> |
getSavedExceptions()
|
int |
getTimeout()
|
boolean |
hadPartialSuccess()
|
void |
setTimeout(int timeout)
Set the timeout for any method to successfully authenticate before it is abandoned. |
Method Detail |
---|
void authenticate(String username, Service nextService, Iterable<AuthMethod> methods) throws UserAuthException, TransportException
username
using each of methods
in order. nextService
is the
Service
that will be enabled on successful authentication.
Authentication fails if there are no method available, i.e. if all the method failed or there were method
available but could not be attempted because the server did not allow them. In this case, a UserAuthException
is thrown with its cause as the last authentication failure. Other UserAuthException
's
which may have been ignored may be accessed via getSavedExceptions()
.
Further attempts may also be made by catching UserAuthException
and retrying with this method.
username
- the user to authenticatenextService
- the service to set on successful authenticationmethods
- the AuthMethod
's to try
UserAuthException
- in case of authentication failure
TransportException
- if there was a transport-layer errorString getBanner()
Deque<UserAuthException> getSavedExceptions()
int getTimeout()
timeout
for a method to successfully authenticate before it is abandoned.boolean hadPartialSuccess()
true
if at least one of the method supplied succeeded.void setTimeout(int timeout)
timeout
for any method to successfully authenticate before it is abandoned.
timeout
- the timeout in seconds
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |