Awesome, fits like a glove.
Thanks Bill.
----- Original Message -----
From: "Bill Burke" <bburke(a)redhat.com>
To: security-dev(a)lists.jboss.org
Sent: Thursday, June 6, 2013 9:51:14 PM
Subject: Re: [security-dev] Supporting different credential types from a single
authentication endpoint
JAX-RS can dispatch based on Content-Type of incoming message.
@Path("/authenticate")
public class Resource {
@POST
@Consumes("type1/type1")
public void postType1(CredType1 cred) {
}
@POST
@Consumes("type2/type2")
public void postType2(CredType2 cred) {
}
@POST
@Consumes("type3/type3")
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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/security-dev
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
_______________________________________________
security-dev mailing list
security-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/security-dev