Package org.springframework.security.oauth.provider.token

Examples of org.springframework.security.oauth.provider.token.InvalidOAuthTokenException


      throw new InvalidOAuthParametersException("An OAuth token id is required.");
    }

    OAuthProviderToken token = getTokenServices().getToken(requestToken);
    if (token == null) {
      throw new InvalidOAuthTokenException("No callback value has been provided for request token " + requestToken + ".");
    }

    String callbackURL = token.getCallbackUrl();
    if (isRequire10a() && callbackURL == null) {
      throw new InvalidOAuthTokenException("No callback value has been provided for request token " + requestToken + ".");
    }

    if (callbackURL != null) {
      request.setAttribute(CALLBACK_ATTRIBUTE, callbackURL);
    }
View Full Code Here


            return providerTokenFor(sessionManager.getSession(token));
        } catch (EnMeNotValidKeyOAuthSecurityException e) {
            try {
                return providerTokenFor(this.applicationDao.findAppConnection(token));
            } catch (EnMeNoResultsFoundException ex) {
                throw new InvalidOAuthTokenException("Could not find OAuthSession or AppConnection for provided OAuth request token " + token);
            }
        }
    }
View Full Code Here

        }
        try {
            Long authorizingAccountId = ((UserAccount) authentication.getPrincipal()).getUid();
            sessionManager.authorize(requestToken, authorizingAccountId, verifier);
        } catch (EnMeNotValidKeyOAuthSecurityException e) {
            throw new InvalidOAuthTokenException(e.getMessage());
        }
    }
View Full Code Here

    public OAuthAccessProviderToken createAccessToken(String requestToken)
            throws AuthenticationException {
        try {
            return providerTokenFor(sessionManager.grantAccess(requestToken));
        } catch (EnMeNotValidKeyOAuthSecurityException e) {
            throw new InvalidOAuthTokenException(e.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.oauth.provider.token.InvalidOAuthTokenException

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.