I'm building an application with an API layer. To access an API endpoint the request should carry a valid token
. The token is generated and assigned upon successful authentication of a user. A user can be authenticated through multiple ways: DB username/password check, FB, LDAP
and so on.
I currently have a ServletContextHandler
executing a Jersey Servlet Container
, serving endpoints /api/*
.
Aim is to add login endpoints: /login/fb, /login/myapp, login/ldap
and I'm unsure where exactly it fits in. Should I add these as other endpoints in the jersey servlet or add a new custom servlet to handle these logins. Was wondering if there is another way of handling such multiple login endpoints in Jetty.
I do not use any xml to configure Jetty. The existing filters were configured through annotations and I would like to continue this way.
Haven't used Jetty before, not sure about the suitable architecture pattern applicable to this case.
Aucun commentaire:
Enregistrer un commentaire