ParameterType - defining the parameter type for the authenticationTokenType - defining the token type for the authenticationpublic abstract class BasicAuthentication<ParameterType,TokenType> extends AbstractAuthenticationHandler<ParameterType,TokenType>
Authenticator.| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
password
The current password.
|
protected String |
user
The current user name.
|
done, params, proxy| Constructor and Description |
|---|
BasicAuthentication(InetSocketAddress proxy,
String initialUser,
char[] initialPassword)
Creates a new
BasicAuthentication to authenticate with the given
proxy. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
askCredentials()
Asks for credentials via the global
Authenticator. |
protected void |
clearPassword()
Clears the
password. |
void |
close() |
void |
process()
Produces the next authentication token, if any.
|
void |
start()
Produces the initial authentication token that can be then retrieved via
AuthenticationHandler.getToken(). |
isDone, setParamsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTokenprotected String user
protected byte[] password
public BasicAuthentication(InetSocketAddress proxy, String initialUser, char[] initialPassword)
BasicAuthentication to authenticate with the given
proxy.proxy - InetSocketAddress of the proxy to connect toinitialUser - initial user name to try; may be nullinitialPassword - initial password to try, may be nullprotected void clearPassword()
password.public final void close()
public final void start()
throws Exception
AuthenticationHandlerAuthenticationHandler.getToken().Exception - if an error occurspublic void process()
throws Exception
AuthenticationHandlerException - if an error occursprotected void askCredentials()
Authenticator.Copyright © 2020 Eclipse JGit Project. All rights reserved.