private static boolean hasCredential(HttpMessageContext httpMessageContext) { return httpMessageContext.getAuthParameters().getCredential() != null; }
private static boolean hasCredential(HttpMessageContext httpMessageContext) { return httpMessageContext.getAuthParameters().getCredential() != null; }
@Override public AuthenticationStatus validateRequest(HttpServletRequest request, HttpServletResponse response, HttpMessageContext httpMessageContext) throws AuthenticationException { if (hasCredential(httpMessageContext)) { IdentityStoreHandler identityStoreHandler = CDI.current().select(IdentityStoreHandler.class).get(); return httpMessageContext.notifyContainerAboutLogin( identityStoreHandler.validate( httpMessageContext.getAuthParameters() .getCredential())); } return httpMessageContext.doNothing(); }
@Override public AuthenticationStatus validateRequest(HttpServletRequest request, HttpServletResponse response, HttpMessageContext httpMessageContext) throws AuthenticationException { if (hasCredential(httpMessageContext)) { IdentityStoreHandler identityStoreHandler = CDI.current().select(IdentityStoreHandler.class).get(); return httpMessageContext.notifyContainerAboutLogin( identityStoreHandler.validate( httpMessageContext.getAuthParameters() .getCredential())); } return httpMessageContext.doNothing(); }