Java Magazine, Nov/Dec 2017
ORACLE COM JAVAMAGAZINE NOVEMBER DECEMBER 2017 31 java ee 8 @ Override public void cleanSubject HttpServletRequest request HttpServletResponse response HttpMessageContext httpMessageContext getWrapped cleanSubject request response httpMessageContext Having the HttpAuthenticationMechanism instance ready the annotation instance can now be configured dynamically The instance has to be created first which can be done via CDIs provided AnnotationLiteral helper type Because the @ RememberMe annotation has many attributes its a little unwieldy but its still relatively straightforward public class RememberMeAnnotationLiteral extends AnnotationLiteral RememberMe implements RememberMe private static final long serialVersionUID 1L int cookieMaxAgeSeconds String cookieMaxAgeSecondsExpression boolean cookieSecureOnly String cookieSecureOnlyExpression boolean cookieHttpOnly String cookieHttpOnlyExpression String cookieName boolean isRememberMe
You must have JavaScript enabled to view digital editions.