com.wewebu.ow.server.ecmimpl.cmis.auth
Class OwCMISCredentialsAuthenticator

java.lang.Object
  extended by com.wewebu.ow.server.ecmimpl.cmis.auth.OwCMISCredentialsAuthenticator
All Implemented Interfaces:
com.wewebu.ow.server.auth.OwAuthenticator

public class OwCMISCredentialsAuthenticator
extends Object
implements com.wewebu.ow.server.auth.OwAuthenticator

CMIS credentials based authenticator.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
4.0.0.0

Field Summary
static String CONF_NODE_SECURITY_HANDLER
          optional configuration node name containing the full qualified java class name
 
Constructor Summary
OwCMISCredentialsAuthenticator(com.wewebu.ow.server.conf.OwBaseInitializer baseInitializer_p)
           
OwCMISCredentialsAuthenticator(com.wewebu.ow.server.util.OwXMLUtil configNode)
           
 
Method Summary
 com.wewebu.ow.server.auth.OwAuthentication authenticate(com.wewebu.ow.server.auth.OwAuthentication authentication_p)
           
protected  OwCMISCredentials createCredentials(String strUser_p, String strPassword_p, com.wewebu.ow.server.util.OwXMLUtil configuration_p, TimeZone wsiTimeZone_p, Locale locale_p, com.wewebu.ow.server.mandator.OwMandator mandator_p)
          (overridable) Creates credentials for given name and password with respect to the <Authentication> bootstrap configuration.
protected  com.wewebu.ow.server.util.ldap.OwLdapConnector createLDAPConnector(Node authenticationNode_p)
          (overridable) Creates an LDAP connection for a given bootstrap configuration node (usually the <Authentication> node).
The returned connector is not authenticated.
protected  OwCMISLDAPCredentials createLDAPCredentials(com.wewebu.ow.server.util.OwXMLUtil configuration_p, Node authenticationNode_p, String username_p, String password_p, OwCMISSecurityHandlerInterface handler_p, com.wewebu.ow.server.mandator.OwMandator mandator_p)
          (overridable) Creates a LDAP credentials object for a given bootstrap configuration node (usually the <Authentication> node) , user name and password and current mandator
protected  OwCMISSecurityHandlerInterface createSecurityHandler(Map<String,String> initValues_p, Locale locale_p, com.wewebu.ow.server.util.OwXMLUtil configuration_p)
          (overridable) Creates a security handler which will be used for the web service communication.
protected  Map<String,String> getLoginMap(String user_p, String pwd_p)
          Method called to create/retrieve the hash map which should be used for initialization of the OwCMISSecurityHandlerInterface.
protected  com.wewebu.ow.server.util.OwXMLUtil getNetworkConfiguration()
          Get the current configuration node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONF_NODE_SECURITY_HANDLER

public static final String CONF_NODE_SECURITY_HANDLER
optional configuration node name containing the full qualified java class name

See Also:
Constant Field Values
Constructor Detail

OwCMISCredentialsAuthenticator

public OwCMISCredentialsAuthenticator(com.wewebu.ow.server.conf.OwBaseInitializer baseInitializer_p)

OwCMISCredentialsAuthenticator

public OwCMISCredentialsAuthenticator(com.wewebu.ow.server.util.OwXMLUtil configNode)
Method Detail

authenticate

public com.wewebu.ow.server.auth.OwAuthentication authenticate(com.wewebu.ow.server.auth.OwAuthentication authentication_p)
                                                        throws com.wewebu.ow.server.exceptions.OwAuthenticationException,
                                                               com.wewebu.ow.server.exceptions.OwConfigurationException,
                                                               com.wewebu.ow.server.exceptions.OwServerException
Specified by:
authenticate in interface com.wewebu.ow.server.auth.OwAuthenticator
Throws:
com.wewebu.ow.server.exceptions.OwAuthenticationException
com.wewebu.ow.server.exceptions.OwConfigurationException
com.wewebu.ow.server.exceptions.OwServerException

getNetworkConfiguration

protected com.wewebu.ow.server.util.OwXMLUtil getNetworkConfiguration()
                                                               throws com.wewebu.ow.server.exceptions.OwConfigurationException
Get the current configuration node.

Returns:
OwXMLUtil
Throws:
com.wewebu.ow.server.exceptions.OwConfigurationException

createCredentials

protected OwCMISCredentials createCredentials(String strUser_p,
                                              String strPassword_p,
                                              com.wewebu.ow.server.util.OwXMLUtil configuration_p,
                                              TimeZone wsiTimeZone_p,
                                              Locale locale_p,
                                              com.wewebu.ow.server.mandator.OwMandator mandator_p)
                                       throws com.wewebu.ow.server.exceptions.OwException
(overridable) Creates credentials for given name and password with respect to the <Authentication> bootstrap configuration.

Parameters:
strUser_p -
strPassword_p -
Returns:
an OwCMISCredentials
Throws:
com.wewebu.ow.server.exceptions.OwServerException
com.wewebu.ow.server.exceptions.OwException

createSecurityHandler

protected OwCMISSecurityHandlerInterface createSecurityHandler(Map<String,String> initValues_p,
                                                               Locale locale_p,
                                                               com.wewebu.ow.server.util.OwXMLUtil configuration_p)
                                                        throws com.wewebu.ow.server.exceptions.OwException
(overridable) Creates a security handler which will be used for the web service communication.

Will check if the the configuration contains the node CONF_NODE_SECURITY_HANDLER and try to instantiate the defined class. If the node is missing, it will create by default an instance of OwCMISSecurityHandler.

Parameters:
initValues_p - Map of String key and values to be used for init-method
Returns:
OwCMISSecurityHandlerInterface instance
Throws:
com.wewebu.ow.server.exceptions.OwException

createLDAPCredentials

protected OwCMISLDAPCredentials createLDAPCredentials(com.wewebu.ow.server.util.OwXMLUtil configuration_p,
                                                      Node authenticationNode_p,
                                                      String username_p,
                                                      String password_p,
                                                      OwCMISSecurityHandlerInterface handler_p,
                                                      com.wewebu.ow.server.mandator.OwMandator mandator_p)
                                               throws com.wewebu.ow.server.exceptions.OwException
(overridable) Creates a LDAP credentials object for a given bootstrap configuration node (usually the <Authentication> node) , user name and password and current mandator

Parameters:
username_p -
password_p -
mandator_p - current OwMandator , null for no mandator
Returns:
an OwCMISLDAPCredentials for the given bootstrap configuration node (usually the <Authentication> node) , user name and password and current mandator
Throws:
com.wewebu.ow.server.exceptions.OwException

createLDAPConnector

protected com.wewebu.ow.server.util.ldap.OwLdapConnector createLDAPConnector(Node authenticationNode_p)
(overridable) Creates an LDAP connection for a given bootstrap configuration node (usually the <Authentication> node).
The returned connector is not authenticated.

Parameters:
authenticationNode_p -
Returns:
an OwLdapConnector for the given configuration node

getLoginMap

protected Map<String,String> getLoginMap(String user_p,
                                         String pwd_p)
Method called to create/retrieve the hash map which should be used for initialization of the OwCMISSecurityHandlerInterface.

By default this method try to

Parameters:
user_p - String representing the current user name
pwd_p - String representing the current user password
Returns:
HashMap of String key to String value


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.