|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.feide.moria.webservices.v2_2.AuthenticationImpl
public final class AuthenticationImpl
Implements the Moria2 v2.1 SOAP interface.
Authentication| Field Summary | |
|---|---|
private static java.lang.String |
AUTHN_EX_MSG
Log message for AuthenticationExceptions. |
private static java.lang.String |
AUTHZ_EX_MESSAGE
Log message for AuthorizationExceptions. |
private static java.lang.String |
DIR_UNAV_EX_MSG
Log message for DirectoryUnavailableExceptions. |
private static java.lang.String |
INOP_STATE_EX_MSG
Log message for InoperableStateExceptions. |
private no.feide.moria.log.MessageLogger |
messageLogger
The message logger. |
private static java.lang.String |
MORIACTRL_EX_MESSAGE
Log message for MoriaControllerExceptions. |
private static java.lang.String |
UNKNOWN_TICKET_EX_MSG
Log message for UnknownTicketExceptions. |
| Constructor Summary | |
|---|---|
AuthenticationImpl()
Default constructor. |
|
| Method Summary | |
|---|---|
Attribute[] |
directNonInteractiveAuthentication(java.lang.String[] attributes,
java.lang.String username,
java.lang.String password)
Performs direct non-interactive authentication. |
private static java.lang.String |
encodeValues(java.lang.String separator,
java.lang.String[] values)
Encode a String array into a single string, using the
separator between attribute values. |
java.lang.String |
getProxyTicket(java.lang.String ticketGrantingTicket,
java.lang.String proxyServicePrincipal)
Gets a proxy ticket. |
Attribute[] |
getUserAttributes(java.lang.String serviceTicket)
Gets user attributes. |
java.lang.String |
initiateAuthentication(java.lang.String[] attributes,
java.lang.String returnURLPrefix,
java.lang.String returnURLPostfix,
boolean forceInteractiveAuthentication)
Initiates authentication. |
private Attribute[] |
mapToAttributeArray(java.util.Map map,
java.lang.String activeTicketId)
Utility method to convert a Map to an array of
Attributes. |
Attribute[] |
proxyAuthentication(java.lang.String[] attributes,
java.lang.String proxyTicket)
Performs proxy authentication. |
boolean |
verifyUserExistence(java.lang.String username)
Verifies the existence of a given user in the underlying directories. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private no.feide.moria.log.MessageLogger messageLogger
private static final java.lang.String AUTHZ_EX_MESSAGE
AuthorizationExceptions.
private static final java.lang.String AUTHN_EX_MSG
AuthenticationExceptions.
private static final java.lang.String DIR_UNAV_EX_MSG
DirectoryUnavailableExceptions.
private static final java.lang.String MORIACTRL_EX_MESSAGE
MoriaControllerExceptions.
private static final java.lang.String INOP_STATE_EX_MSG
InoperableStateExceptions.
private static final java.lang.String UNKNOWN_TICKET_EX_MSG
UnknownTicketExceptions.
| Constructor Detail |
|---|
public AuthenticationImpl()
| Method Detail |
|---|
public java.lang.String initiateAuthentication(java.lang.String[] attributes,
java.lang.String returnURLPrefix,
java.lang.String returnURLPostfix,
boolean forceInteractiveAuthentication)
throws AuthorizationFailedException,
IllegalInputException,
InternalException
Authentication
initiateAuthentication in interface Authenticationattributes - The attributes the service wants returned on login.returnURLPrefix - The prefix of the URL the user is to be returned to after
successful authentication.returnURLPostfix - The optional postfix of the return URL.forceInteractiveAuthentication - If true, user is forced through authentication
even if SSO is possible.
AuthorizationFailedException - If the service is now allowed to perform this operation, or
if the service is not allowed to read one or more of the
requested attributes.
IllegalInputException - If the method is called with illegal parameters, such as a
returnURLPrefix/
returnURLPostfix combination that does not
yield a valid URL.
InternalException - If an internal problem prevents Moria2 from performing this
operation.Authentication.initiateAuthentication(java.lang.String[],
java.lang.String, java.lang.String, boolean)
public Attribute[] directNonInteractiveAuthentication(java.lang.String[] attributes,
java.lang.String username,
java.lang.String password)
throws AuthorizationFailedException,
AuthenticationFailedException,
AuthenticationUnavailableException,
IllegalInputException,
InternalException
Authentication
directNonInteractiveAuthentication in interface Authenticationattributes - The attributes the service wants returned following
authentication.username - The user name of the user to be authenticated.password - The password of the user to be authenticated.
AuthorizationFailedException - If the service is now allowed to perform this operation, or
if the service is not allowed to read one or more of the
requested attributes.
AuthenticationFailedException - If the user credentials (given by username/
password) are not valid.
AuthenticationUnavailableException - If the third-party authentication server responsible for
authenticating this user is not available.
IllegalInputException - If the method is called with illegal parameters.
InternalException - If an internal problem prevents Moria2 from performing this
operation.Authentication.directNonInteractiveAuthentication(java.lang.String[],
java.lang.String, java.lang.String)
public Attribute[] proxyAuthentication(java.lang.String[] attributes,
java.lang.String proxyTicket)
throws AuthorizationFailedException,
IllegalInputException,
InternalException,
UnknownTicketException
Authentication
proxyAuthentication in interface Authenticationattributes - The attributes the service wants returned following proxy
authentication.proxyTicket - The proxy ticket given to the calling system by its initiator.
AuthorizationFailedException - If the service is now allowed to perform this operation, or
if the service is not allowed to read one or more of the
requested attributes.
IllegalInputException - If the method is called with illegal parameters.
InternalException - If an internal problem prevents Moria2 from performing this
operation.
UnknownTicketException - If the proxy ticket given by proxyTicket does
not match an existing and valid session.Authentication.proxyAuthentication(java.lang.String[],
java.lang.String)
public java.lang.String getProxyTicket(java.lang.String ticketGrantingTicket,
java.lang.String proxyServicePrincipal)
throws AuthorizationFailedException,
IllegalInputException,
InternalException,
UnknownTicketException
Authentication
getProxyTicket in interface AuthenticationticketGrantingTicket - A TGT that has been issued previously.proxyServicePrincipal - The service which the proxy ticket should be issued for.
AuthorizationFailedException - If the service is now allowed to perform this operation.
IllegalInputException - If the method is called with illegal parameters.
InternalException - If an internal problem prevents Moria2 from performing this
operation.
UnknownTicketException - If the ticket granting ticket given by
ticketGrantingTicket does not match an
existing and valid session.Authentication.getProxyTicket(java.lang.String,
java.lang.String)
public Attribute[] getUserAttributes(java.lang.String serviceTicket)
throws AuthorizationFailedException,
IllegalInputException,
InternalException,
UnknownTicketException
Authentication
getUserAttributes in interface AuthenticationserviceTicket - The ticket included in the return request issued by the
client.
AuthorizationFailedException - If the service is now allowed to perform this operation.
IllegalInputException - If the method is called with an illegal parameter.
InternalException - If an internal problem prevents Moria2 from performing this
operation.
UnknownTicketException - If the service ticket given by serviceTicket
does not match an existing or valid session.Authentication.getUserAttributes(java.lang.String)
public boolean verifyUserExistence(java.lang.String username)
throws AuthorizationFailedException,
AuthenticationUnavailableException,
IllegalInputException,
InternalException
Authentication
verifyUserExistence in interface Authenticationusername - The username to be validated.
true if the user is found, otherwise
false.
AuthorizationFailedException - If the service is now allowed to perform this operation.
AuthenticationUnavailableException - If the authentication server where this user belongs is not
available.
IllegalInputException - If the method is called with an illegal parameter.
InternalException - If an internal problem prevents Moria2 from performing this
operation.Authentication.verifyUserExistence(java.lang.String)
private Attribute[] mapToAttributeArray(java.util.Map map,
java.lang.String activeTicketId)
Map to an array of
Attributes.
map - The Map to be converted.activeTicketId - Optional variable for logging purposes.
Attribute objects.
private static java.lang.String encodeValues(java.lang.String separator,
java.lang.String[] values)
String array into a single string, using the
separator between attribute values. All occurrences of
separator in the original attribute values are replaced by
two separators.
separator - The separator to be used.values - The values to be encoded using separator.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||