users@jaspic-spec.java.net

[JIRA] Created: (JASPIC_SPEC-14) Support CDI and other container services in SAM

From: arjan tijms (JIRA) <"arjan>
Date: Wed, 27 Mar 2013 13:59:53 +0000 (GMT+00:00)

Support CDI and other container services in SAM
-----------------------------------------------

                 Key: JASPIC_SPEC-14
                 URL: http://java.net/jira/browse/JASPIC_SPEC-14
             Project: jaspic-spec
          Issue Type: New Feature
            Reporter: arjan tijms


In JASPIC 1.0 it has not been specified whether under the Servlet profile container services like CDI should be available at the time that a SAM is called at the start of a request.

In some implementations (e.g. JBoss EAP 6.0.1) those services are indeed fully available, while in other implementations (e.g. GlassFish 3.1.2.2) the services are partially available. In yet other implementations (e.g. WebLogic 12c 12.1.1) those services are not available at all.

For a number of use cases having this support is important, e.g.

* Fetching users via EJB/JPA for a database based auth module
* Generating and persisting tokens for "remember me" functionality
* Creating a user locally after a first time authentication with an external provider (e.g. OpenId)

Ideally the support would be at the same level as that of a Servlet [Filter|http://docs.oracle.com/javaee/6/api/javax/servlet/Filter.html], meaning the CDI request and session scopes are available, the "java:comp", "java:module", "java:app", etc JNDI namespaces have been set up, injection is possible, etc.

In order to support injection as well, the Factory API might need to have variants of its methods that take a {{Class}} type instead of an object instance, like e.g. [addFilter(String, Filter)|http://docs.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#addFilter(java.lang.String,%20javax.servlet.Filter)] vs [addFilter(String, Class)|http://docs.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#addFilter(java.lang.String,%20java.lang.Class)]. There might also need to be methods like {{createSam(Class)}} in analogy to [createFilter|http://docs.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#createFilter(java.lang.Class)] and similar methods.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira