[security-dev] Supporting different credential types from a single authentication endpoint

Bill Burke bburke at redhat.com
Thu Jun 6 20:51:14 EDT 2013

JAX-RS can dispatch based on Content-Type of incoming message.

public class Resource {

public void postType1(CredType1 cred) {

public void postType2(CredType2 cred) {

public void postType3(CredType3 cred) {


On 6/6/2013 8:37 PM, Pedro Igor Silva wrote:
> Hi,
>      I would like to create a generic authentication endpoint using JAX-RS (with a single @Path for authentication) to support multiple credentials. Each credential type may have its own payload format, so I need to convert the payload to the correct implementation before authenticating.
>      Do I have to use @Provider for this "dynamic" behavior ? Or there is a more easy way to achieve that ?
>      What about using custom mime types for each credential type ?
> Thanks.
> Pedro Igor
> _______________________________________________
> security-dev mailing list
> security-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/security-dev

Bill Burke
JBoss, a division of Red Hat

More information about the security-dev mailing list