Package org.springframework.social.oauth2

Examples of org.springframework.social.oauth2.OAuth2TokenParameterRequestInterceptor


    return new AccessGrant("12345", null,  "23456", 3600L);
  }
 
  @Deprecated
  public AccessGrant refreshAccess(String refreshToken, String scope, MultiValueMap<String, String> additionalParameters) {
    return new AccessGrant("12345", null,  "23456", 3600L);
  }
View Full Code Here


  @Deprecated
  public AccessGrant refreshAccess(String refreshToken, String scope, MultiValueMap<String, String> additionalParameters) {
    return new AccessGrant("12345", null,  "23456", 3600L);
  }
  public AccessGrant authenticateClient() {
    return new AccessGrant("12345", null,  null, 3600L);
  }
View Full Code Here

  }
  public AccessGrant authenticateClient() {
    return new AccessGrant("12345", null,  null, 3600L);
  }
  public AccessGrant authenticateClient(String scope) {
    return new AccessGrant("12345", null,  null, 3600L);
  }
View Full Code Here

    assertEquals("1", userIds.get(0));
  }

  @Test
  public void findUserIdWithConnectionNoSuchConnection() {
    Connection<TestFacebookApi> connection = facebookConnectionFactory.createConnection(new AccessGrant("12345"));
    assertEquals(0, usersConnectionRepository.findUserIdsWithConnection(connection).size());
  }
View Full Code Here

    assertTrue(localUserIds.contains("2"));
  }

  @Test
  public void findUserIdWithConnectionNoConnection_withWorkingConnectionSignUp() {   
    Connection<TestFacebookApi> connection = facebookConnectionFactory.createConnection(new AccessGrant("12345"));
    usersConnectionRepository.setConnectionSignUp(new ConnectionSignUp() {
      public String execute(Connection<?> connection) {
        return "batman";
      }
    });
View Full Code Here

    assertEquals("batman", userIds.get(0));
  }

  @Test
  public void findUserIdWithConnectionNoConnection_withConnectionSignUpReturningNull() {   
    Connection<TestFacebookApi> connection = facebookConnectionFactory.createConnection(new AccessGrant("12345"));
    usersConnectionRepository.setConnectionSignUp(new ConnectionSignUp() {
      public String execute(Connection<?> connection) {
        return null;
      }
    });
View Full Code Here

    connectionRepository.removeConnection(new ConnectionKey("facebook", "1"));
  }
 
  @Test
  public void addConnection() {
    Connection<TestFacebookApi> connection = facebookConnectionFactory.createConnection(new AccessGrant("123456789", null, "987654321", 3600L));
    connectionRepository.addConnection(connection);
    Connection<TestFacebookApi> restoredConnection = connectionRepository.getPrimaryConnection(TestFacebookApi.class);
    assertEquals(connection, restoredConnection)
    assertNewConnection(restoredConnection);
  }
View Full Code Here

    assertNewConnection(restoredConnection);
  }

  @Test(expected=DuplicateConnectionException.class)
  public void addConnectionDuplicate() {
    Connection<TestFacebookApi> connection = facebookConnectionFactory.createConnection(new AccessGrant("123456789", null, "987654321", 3600L));
    connectionRepository.addConnection(connection);
    connectionRepository.addConnection(connection);
  }
View Full Code Here

        }       
        public AccessGrant exchangeCredentialsForAccess(String username, String password, MultiValueMap<String, String> additionalParameters) {
          return null;
        }
        public AccessGrant refreshAccess(String refreshToken, MultiValueMap<String, String> additionalParameters) {
          return new AccessGrant("765432109", "read", "654321098", 3600L);
        }
        @Deprecated
        public AccessGrant refreshAccess(String refreshToken, String scope, MultiValueMap<String, String> additionalParameters) {
          return new AccessGrant("765432109", "read", "654321098", 3600L);
        }
        public AccessGrant authenticateClient() {
          return null;
        }
        public AccessGrant authenticateClient(String scope) {
View Full Code Here

    assertEquals("1", userIds.get(0));
  }
 
  @Test
  public void findUserIdWithConnectionNoSuchConnection() {
    Connection<TestFacebookApi> connection = connectionFactory.createConnection(new AccessGrant("12345"));
    assertEquals(0, usersConnectionRepository.findUserIdsWithConnection(connection).size());
  }
View Full Code Here

TOP

Related Classes of org.springframework.social.oauth2.OAuth2TokenParameterRequestInterceptor

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.