Package org.springframework.social

Examples of org.springframework.social.ExpiredAuthorizationException


  private class ApiInvocationHandler implements InvocationHandler {

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
      synchronized (getMonitor()) {
        if (hasExpired()) {
          throw new ExpiredAuthorizationException(getKey().getProviderId());
        }
        try {
          return method.invoke(OAuth2Connection.this.api, args);
        } catch (InvocationTargetException e) {
          throw e.getTargetException();
View Full Code Here


@Controller
public class TwitterRevokedToken {

  @RequestMapping("/twitter/revoked")
  public void simulateExpiredToken() {
    throw new ExpiredAuthorizationException("twitter");
  }
View Full Code Here

@Controller
public class FacebookExpiredToken {

  @RequestMapping("/facebook/expired")
  public void simulateExpiredToken() {
    throw new ExpiredAuthorizationException("facebook");
  }
View Full Code Here

    }
  }

  private void handleInvalidAccessToken(String message) {
    if (message.contains("Session has expired at unix time")) {
      throw new ExpiredAuthorizationException("facebook");
    } else if (message.contains("The session has been invalidated because the user has changed the password.")) {
      throw new RevokedAuthorizationException("facebook", message);
    } else if (message.contains("The session is invalid because the user logged out.")) {
      throw new RevokedAuthorizationException("facebook", message);
    } else if (message.contains("The session was invalidated explicitly using an API call.")) {
View Full Code Here

TOP

Related Classes of org.springframework.social.ExpiredAuthorizationException

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.