public class GssapiMechanism extends AbstractMechanism
Mechanism.PRIORITY| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
EMPTY| Constructor and Description |
|---|
GssapiMechanism() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getChallengeResponse(byte[] challenge)
Create a response based on a given challenge from the remote peer.
|
String |
getConfigScope() |
byte[] |
getInitialResponse()
Create an initial response based on selected mechanism.
|
String |
getName() |
int |
getPriority() |
String |
getProtocol() |
String |
getServerName() |
void |
init(Map<String,String> saslOptions)
Perform any configuration initiation required by the mechanism.
|
boolean |
isApplicable(String username,
String password,
Principal localPrincipal)
Allows the mechanism to determine if it can be used given the authentication
provided.
|
boolean |
isEnabledByDefault()
Allows the mechanism to indicate if it is enabled by default, or only when explicitly enabled
through configuring the permitted sasl mechanisms.
|
void |
setConfigScope(String configScope) |
void |
setProtocol(String protocol) |
void |
setServerName(String serverName) |
void |
verifyCompletion()
Verifies that the SASL exchange has completed successfully.
|
compareTo, getPassword, getUsername, setPassword, setUsername, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAdditionalFailureInformationpublic static final String NAME
public int getPriority()
public String getName()
public boolean isEnabledByDefault()
MechanismisEnabledByDefault in interface MechanismisEnabledByDefault in class AbstractMechanismpublic void init(Map<String,String> saslOptions)
Mechanisminit in interface Mechanisminit in class AbstractMechanismsaslOptions - An immutable map of sasl options. Will always be non-null.public byte[] getInitialResponse()
throws SaslException
MechanismSaslException - if an error occurs computing the response.public byte[] getChallengeResponse(byte[] challenge)
throws SaslException
Mechanismchallenge - the challenge that this Mechanism should response to.SaslException - if an error occurs computing the response.public void verifyCompletion()
throws SaslException
MechanismverifyCompletion in interface MechanismverifyCompletion in class AbstractMechanismSaslException - if the outcome of the SASL exchange is not valid for this Mechanismpublic boolean isApplicable(String username, String password, Principal localPrincipal)
Mechanismusername - The user name given to the client for authentication.password - The password given to the client for authentication.localPrincipal - The local Principal configured for the client for authentication.public String getProtocol()
public void setProtocol(String protocol)
public String getServerName()
public void setServerName(String serverName)
public String getConfigScope()
public void setConfigScope(String configScope)
Copyright © 2013–2019 The Apache Software Foundation. All rights reserved.