Package org.springframework.social.github.api

Examples of org.springframework.social.github.api.GitHubUserProfile


    dummy.setUsername("willie");
    model.addAttribute(dummy);
    model.addAttribute("entity", dummy);
   
    // GitHub profile
    GitHubUserProfile gitHubUser = userAccountService.getCurrentUserProfile();
    if (gitHubUser != null) {
      model.addAttribute(gitHubUser);
    }
   
    return addNavigation(model, sitemap.getCiDetailsViewId(UserAccount.class));
View Full Code Here


        this.teamService = teamService;
        this.gitHubTeamId = gitHubTeamId;
    }

    public MemberProfile getOrCreateMemberProfile(Long githubId, GitHub gitHub) {
        GitHubUserProfile remoteProfile = gitHub.userOperations().getUserProfile();

        return teamService.createOrUpdateMemberProfile(githubId, remoteProfile.getUsername(), remoteProfile
                .getProfileImageUrl(), remoteProfile.getName());
    }
View Full Code Here

        signInService = new SignInService(teamService, "482984");
    }

    @Test
    public void createOrUpdateMemberProfileOnLogin() {
        GitHubUserProfile userProfile =
                new GitHubUserProfile(1234L, username, name, location, "", "", email, avatarUrl, null);
        UserOperations userOperations = mock(UserOperations.class);

        given(userOperations.getUserProfile()).willReturn(userProfile);
        given(gitHub.userOperations()).willReturn(userOperations);
View Full Code Here

TOP

Related Classes of org.springframework.social.github.api.GitHubUserProfile

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.