Package org.springframework.social.connect

Examples of org.springframework.social.connect.ConnectionRepository.addConnection()


    }

    // add new connection
    Connection<?> connection = authService.getConnectionFactory().createConnection(data);
    connection.sync();
    repo.addConnection(connection);
    return connection;
  }

  // private helpers
  private Authentication getAuthentication() {
View Full Code Here


        return null;
      }
    }

    // add new connection
    repo.addConnection(connection);
    return connection;
  }

  // private helpers
  private Authentication getAuthentication() {
View Full Code Here

  public void disconnect() throws Exception {
    FacebookConnectionFactory connectionFactory = new FacebookConnectionFactory("clientId", CLIENT_SECRET);
    Connection<Facebook> connection = connectionFactory.createConnection(new ConnectionData("facebook", "738140579", "", "", "", "", "", "", null));
    StubUsersConnectionRepository usersConnectionRepository = new StubUsersConnectionRepository();
    ConnectionRepository connectionRepository = usersConnectionRepository.createConnectionRepository("habuma");
    connectionRepository.addConnection(connection);
    assertEquals(1, connectionRepository.findAllConnections().size());
    DisconnectController controller = new DisconnectController(usersConnectionRepository, CLIENT_SECRET);
    MockMvc mockMvc = standaloneSetup(controller).build();
    mockMvc.perform(post("/disconnect/facebook").param("signed_request", SIGNED_REQUEST))
      .andExpect(status().isNoContent());   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.