Package overit.geocall.basic.bl.auth
Class AuthenticatorExtractor
java.lang.Object
overit.geocall.basic.bl.auth.AuthenticatorExtractor
Class that allows you to extract an authenticator, among those registered, able to authenticate the request for
generation of an access token
-
Constructor Summary
ConstructorsConstructorDescriptionAuthenticatorExtractor(HttpServletRequest httpRequest) Main class's construct. -
Method Summary
Modifier and TypeMethodDescriptionoverit.geocall.rs.auth.Authenticationoverit.geocall.rs.auth.AuthenticationgetFirstValidAuthentication(Collection<String> features)
-
Constructor Details
-
AuthenticatorExtractor
Main class's construct. Create a newAuthenticatorExtractorable to extract an authenticator in order to authenticate the request for generation of an access token- Parameters:
httpRequest- the request from which the token will be generated after authentication.
-
-
Method Details
-
getAuthentications
public Map<Class<? extends overit.geocall.rs.auth.Authenticator>,overit.geocall.rs.auth.Authentication> getAuthentications()- Returns:
- returns the list of the authenticators able to authenticate the token generation request, or the empty list if there is none
-
getFirstValidAuthentication
public overit.geocall.rs.auth.Authentication getFirstValidAuthentication()- Returns:
- returns the first authenticator who was able to authenticate the token generation request, or the null value in case there is none
-
getFirstValidAuthentication
public overit.geocall.rs.auth.Authentication getFirstValidAuthentication(Collection<String> features) - Parameters:
features- collection of features that the service requires for authenticator selection Null means that no particular feature a required.- Returns:
- returns the first authenticator who was able to authenticate the token generation request, or the null value in case there is none
-