Package org.springframework.security.web.authentication.rememberme

Examples of org.springframework.security.web.authentication.rememberme.InvalidCookieException


    /**
     * Validate the token and return it.
     */
    private PersistentToken getPersistentToken(String[] cookieTokens) {
        if (cookieTokens.length != 2) {
            throw new InvalidCookieException("Cookie token did not contain " + 2 +
                    " tokens, but contained '" + Arrays.asList(cookieTokens) + "'");
        }

        final String presentedSeries = cookieTokens[0];
        final String presentedToken = cookieTokens[1];
View Full Code Here


       * one presented.
       */
      protected UserDetails processAutoLoginCookie(String[] cookieTokens, HttpServletRequest request, HttpServletResponse response) {

          if (cookieTokens.length != 2) {
              throw new InvalidCookieException("Cookie token did not contain " + 2 +
                      " tokens, but contained '" + Arrays.asList(cookieTokens) + "'");
          }

          final String presentedSeries = cookieTokens[0];
          final String presentedToken = cookieTokens[1];
View Full Code Here

      HttpServletRequest request, HttpServletResponse response) {
    try{
        setContext(request);
        String ipAddressToken = cookieTokens[cookieTokens.length-1];
        if(!getUserIPAddress(request).equals(ipAddressToken)){
          throw new InvalidCookieException("Cookie IP Address did not contain a matching IP (contained '" + ipAddressToken + "')");
        }
        return super.processAutoLoginCookie(Arrays.copyOf(cookieTokens,cookieTokens.length-1), request, response);
    }catch(Exception e){
      e.printStackTrace();
    }finally{
View Full Code Here

    /**
     * Validate the token and return it.
     */
    private PersistentToken getPersistentToken(String[] cookieTokens) {
        if (cookieTokens.length != 2) {
            throw new InvalidCookieException("Cookie token did not contain " + 2 +
                    " tokens, but contained '" + Arrays.asList(cookieTokens) + "'");
        }

        final String presentedSeries = cookieTokens[0];
        final String presentedToken = cookieTokens[1];
View Full Code Here

TOP

Related Classes of org.springframework.security.web.authentication.rememberme.InvalidCookieException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.