public class AuthenticationService extends BaseServiceClient
EndpointReference, utilizing SASL.| Modifier and Type | Class and Description |
|---|---|
static class |
AuthenticationService.AuthMechanism
This enumeration lists the AUTH mechanisms currently supported by
the client library
|
static class |
AuthenticationService.ResponseCode
This enum models the ResponseCodes that are supported by the WSC ClientLib Authentication Service
Client at this point.
|
static class |
AuthenticationService.WSCExceptionType
An enumeration that describes the various exceptions that the Authentication
Service Client may throw.
|
| Modifier and Type | Field and Description |
|---|---|
private String |
lastMessageId
Used for the RelatesTo header when there is a CONTINUE
|
private AuthenticationService.ResponseCode |
lastResponseCode
Response Values
|
private static Logger |
log |
(package private) boolean |
promiscuousMode
Indicates whether the service client will attempt to down grade in
the event that the server returns an AUTH MECHANISM that was not requested
|
private URL |
serviceURL
Request Values
|
| Constructor and Description |
|---|
AuthenticationService(DiscoveryService discoveryService,
EndpointReference initialEndpointReference) |
| Modifier and Type | Method and Description |
|---|---|
EndpointReference |
authenticate(String username,
String password,
AuthenticationService.AuthMechanism mechanism)
This wraps method calls
|
EndpointReference |
authenticate(String username,
String password,
AuthenticationService.AuthMechanism mechanism,
org.opensaml.saml.saml2.core.RequestedAuthnContext requestedAuthnContext) |
EndpointReference |
authenticateCRAM_MD5(String username,
String password,
org.opensaml.saml.saml2.core.RequestedAuthnContext requestedAuthnContext)
CRAM-MD5 is a two stage authentication procedure.
|
EndpointReference |
authenticatePLAIN(String username,
String password,
org.opensaml.saml.saml2.core.RequestedAuthnContext requestedAuthnContext)
authenticate
Perform the (multi-step) authentication
|
AuthenticationService.ResponseCode |
getLastResponseCode()
Returns the last response code logged by this client
|
private SASLResponse |
invokeSASLRequest(URL addressURL,
SASLRequest request)
Invokes a SASLRequest, returning the SASLResponse
|
boolean |
isPromiscuousMode() |
static AuthenticationService |
serviceForEndpointReference(DiscoveryService discoveryService,
EndpointReference epr)
Creates an Authentication Service Client from the specified EndpointReference
|
void |
setPromiscuousMode(boolean promiscuousMode) |
void |
setServiceURL(URL serviceURL)
Sets the Authentication Service URL
|
getDiscoveryService, getServiceEndpointReference, getServiceEndpointReferenceStore, isSigningOutgoingMessages, replaceServiceEndpointReference, serviceExplicitlySupportsOption, setDiscoveryService, setServiceEndpointReference, setSigningOutgoingMessagesprivate static Logger log
boolean promiscuousMode
private URL serviceURL
private AuthenticationService.ResponseCode lastResponseCode
private String lastMessageId
public AuthenticationService(DiscoveryService discoveryService, EndpointReference initialEndpointReference)
public static AuthenticationService serviceForEndpointReference(DiscoveryService discoveryService, EndpointReference epr)
epr - public void setServiceURL(URL serviceURL)
serviceURL - public AuthenticationService.ResponseCode getLastResponseCode()
public boolean isPromiscuousMode()
public void setPromiscuousMode(boolean promiscuousMode)
public EndpointReference authenticate(String username, String password, AuthenticationService.AuthMechanism mechanism) throws WSCException
username - password - mechanism - WSCExceptionpublic EndpointReference authenticate(String username, String password, AuthenticationService.AuthMechanism mechanism, org.opensaml.saml.saml2.core.RequestedAuthnContext requestedAuthnContext) throws WSCException
username - password - mechanism - requestedAuthnContext - WSCExceptionpublic EndpointReference authenticatePLAIN(String username, String password, org.opensaml.saml.saml2.core.RequestedAuthnContext requestedAuthnContext) throws WSCException
WSCExceptionpublic EndpointReference authenticateCRAM_MD5(String username, String password, org.opensaml.saml.saml2.core.RequestedAuthnContext requestedAuthnContext) throws WSCException
http://www.ietf.org/internet-drafts/draft-ietf-sasl-crammd5-09.txt
username - password - WSCExceptionprivate SASLResponse invokeSASLRequest(URL addressURL, SASLRequest request) throws WSCException
addressUrl - request - WSCExceptionCopyright © 1999–2015. All rights reserved.