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

java.lang.Object
  extended by com.wewebu.ow.server.ecmimpl.opencmis.auth.OwCMISCredentialsAuthenticator
All Implemented Interfaces:
com.wewebu.ow.server.auth.OwAuthenticator
Direct Known Subclasses:
OwCMISAlfrescoCredentialsAuthenticator, OwCMISLDAPCredentialsAuthenticator

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


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 initializer)
           
OwCMISCredentialsAuthenticator(OwCMISNetwork network)
           
 
Method Summary
 com.wewebu.ow.server.auth.OwAuthentication authenticate(com.wewebu.ow.server.auth.OwAuthentication authentication_p)
           
 Map<String,String> buildOpenCmisParameters(String user_p, String pwd_p, Locale currentLocale_p)
          Create the OpenCmis parameters which are used for authentication verification.
protected  OwCMISCredentials createCredentials(String user_p, String password_p, org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider nativeAuthProvider)
          Factory method for credentials objects.
protected  com.wewebu.ow.server.util.ldap.OwLdapConnector createLDAPConnector(com.wewebu.ow.server.util.OwAuthenticationConfiguration authenticationConf_p)
          Factory for LDAP connector instances.
protected  com.wewebu.ow.server.conf.OwBaseInitializer getBaseInitialzier()
          Depending on initialization will return the OwBaseInitializer or null
protected  OwCMISNetwork getNetwork()
          Depending on initialization returning the current network or null
protected  OwCMISNetworkCfg getNetworkConfiguration()
          Get configuration helper instance.
protected  org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider retrieveAuthenticationProvider(Map<String,String> openCmisParams, OwCMISNetworkCfg netConfig)
          Retrieve the (prepared) AuthenticationProvider which should be used for authentication verification and for credentials.
 
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 initializer)
Parameters:
initializer - OwBaseInitializer

OwCMISCredentialsAuthenticator

public OwCMISCredentialsAuthenticator(OwCMISNetwork network)
Parameters:
network -
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 OwCMISNetworkCfg getNetworkConfiguration()
                                            throws com.wewebu.ow.server.exceptions.OwConfigurationException
Get configuration helper instance.

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

buildOpenCmisParameters

public Map<String,String> buildOpenCmisParameters(String user_p,
                                                  String pwd_p,
                                                  Locale currentLocale_p)
                                           throws com.wewebu.ow.server.exceptions.OwConfigurationException
Create the OpenCmis parameters which are used for authentication verification.

Parameters:
user_p - String
pwd_p - String
currentLocale_p - Locale (can be null)
Returns:
Map of key and value Strings
Throws:
com.wewebu.ow.server.exceptions.OwConfigurationException

createCredentials

protected OwCMISCredentials createCredentials(String user_p,
                                              String password_p,
                                              org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider nativeAuthProvider)
                                       throws com.wewebu.ow.server.exceptions.OwException
Factory method for credentials objects.

Parameters:
user_p - String user login name
password_p - String login password
nativeAuthProvider - AuthenticationProvider which should be used for authentication (can be null)
Returns:
OwCMISCredentials
Throws:
com.wewebu.ow.server.exceptions.OwException

getNetwork

protected OwCMISNetwork getNetwork()
Depending on initialization returning the current network or null

Returns:
OwCMISNetwork (can return null)

getBaseInitialzier

protected com.wewebu.ow.server.conf.OwBaseInitializer getBaseInitialzier()
Depending on initialization will return the OwBaseInitializer or null

Returns:
OwBaseInitializer (can return null)

retrieveAuthenticationProvider

protected org.apache.chemistry.opencmis.commons.spi.AuthenticationProvider retrieveAuthenticationProvider(Map<String,String> openCmisParams,
                                                                                                          OwCMISNetworkCfg netConfig)
                                                                                                   throws com.wewebu.ow.server.exceptions.OwException
Retrieve the (prepared) AuthenticationProvider which should be used for authentication verification and for credentials.

By default the provider is created using the network instance, if not available null is returned

Parameters:
openCmisParams - Map of Strings representing configuration parameters
netConfig - OwCMISNetworkCfg current configuration object
Returns:
AuthenticationProvider which was found, retrieved or created
Throws:
com.wewebu.ow.server.exceptions.OwException

createLDAPConnector

protected com.wewebu.ow.server.util.ldap.OwLdapConnector createLDAPConnector(com.wewebu.ow.server.util.OwAuthenticationConfiguration authenticationConf_p)
                                                                      throws com.wewebu.ow.server.exceptions.OwException
Factory for LDAP connector instances.

Parameters:
authenticationConf_p - OwAuthenticationConfiguration
Returns:
OwLdapConnector
Throws:
com.wewebu.ow.server.exceptions.OwException


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.