org.jbpm.security.authentication
Class SubjectAuthenticationServiceFactory

java.lang.Object
  extended by org.jbpm.security.authentication.SubjectAuthenticationServiceFactory
All Implemented Interfaces:
Serializable, ServiceFactory

public class SubjectAuthenticationServiceFactory
extends Object
implements ServiceFactory

Factory to create a SubjectAuthenticationService.

Two properties can be set: allowActorIdOverwrite & principalClassName

principalClassName configuration property specifies the class name of the principal that should be used from the current subject. This could be for example org.jboss.security.CallerIdentity in an JBoss AS.

If not actorId is set, the name of that principal is used as the currently authenticated actorId. If an actorId!=null is set (via setActorId) this one overwrites the principal. This behavior is configurable via the allowActorIdOverwrite attribute. If this is set to false, setActorId is simply ignored.

Example:

 <service name="authentication">
   <factory>
      <bean class="org.jbpm.security.authentication.SubjectAuthenticationServiceFactory">
         <field name="principalClassName"> <string value="org.jboss.security.CallerIdentity" /> </field>
         <field name="allowActorIdOverwrite"> <boolean value="true" /> </field>
      </bean>
   </factory>
 </service>
 

Author:
bernd.ruecker@camunda.com
See Also:
Serialized Form

Constructor Summary
SubjectAuthenticationServiceFactory()
           
 
Method Summary
 void close()
          close this service factory
 String getPrincipalClassName()
           
 Boolean isAllowActorIdOverwrite()
           
 Service openService()
          open a service.
 void setAllowActorIdOverwrite(Boolean allowActorIdOverwrite)
           
 void setPrincipalClassName(String principalClassName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubjectAuthenticationServiceFactory

public SubjectAuthenticationServiceFactory()
Method Detail

openService

public Service openService()
Description copied from interface: ServiceFactory
open a service. The service is to be closed on the Service object.

Specified by:
openService in interface ServiceFactory

close

public void close()
Description copied from interface: ServiceFactory
close this service factory

Specified by:
close in interface ServiceFactory

isAllowActorIdOverwrite

public Boolean isAllowActorIdOverwrite()

setAllowActorIdOverwrite

public void setAllowActorIdOverwrite(Boolean allowActorIdOverwrite)

getPrincipalClassName

public String getPrincipalClassName()

setPrincipalClassName

public void setPrincipalClassName(String principalClassName)


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.