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, setParams
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getToken
protected 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 null
initialPassword
- initial password to try, may be null
protected void clearPassword()
password
.public final void close()
public final void start() throws Exception
AuthenticationHandler
AuthenticationHandler.getToken()
.Exception
- if an error occurspublic void process() throws Exception
AuthenticationHandler
Exception
- if an error occursprotected void askCredentials()
Authenticator
.Copyright © 2019 Eclipse JGit Project. All rights reserved.