public class GitLabAuthenticationToken extends AbstractAuthenticationToken
| Constructor and Description |
|---|
GitLabAuthenticationToken(String accessToken,
String gitlabServer,
org.gitlab4j.api.Constants.TokenType tokenType) |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearCaches()
Necessary for testing
|
String |
getAccessToken()
Gets the OAuth access token, so that it can be persisted and used
elsewhere.
|
GrantedAuthority[] |
getAuthorities() |
Object |
getCredentials() |
org.gitlab4j.api.GitLabApi |
getGitLabAPI() |
List<org.gitlab4j.api.models.Project> |
getGroupProjects(org.gitlab4j.api.models.Group group) |
org.gitlab4j.api.models.User |
getMyself()
Returns the GHMyself object from this instance.
|
String |
getPrincipal()
Returns the login name in GitLab.
|
GitLabOAuthUserDetails |
getUserDetails(String username) |
boolean |
hasOrganizationPermission(String candidateName,
String organization)
For some reason I can't get the gitlab api to tell me for the current
user the groups to which he belongs.
|
boolean |
hasRepositoryPermission(String repositoryName) |
boolean |
isPublicRepository(String repositoryName) |
Set<String> |
listToNames(Collection<org.gitlab4j.api.models.Project> repositories) |
org.gitlab4j.api.models.Group |
loadOrganization(String organization) |
org.gitlab4j.api.models.Project |
loadRepository(String repositoryName) |
org.gitlab4j.api.models.User |
loadUser(String username) |
Set<String> |
myRepositories() |
equals, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitfromSpring, toSpringpublic static void clearCaches()
public String getAccessToken()
public org.gitlab4j.api.GitLabApi getGitLabAPI()
public GrantedAuthority[] getAuthorities()
getAuthorities in interface AuthenticationgetAuthorities in class AbstractAuthenticationTokenpublic Object getCredentials()
public String getPrincipal()
public org.gitlab4j.api.models.User getMyself()
public boolean hasOrganizationPermission(String candidateName, String organization)
candidateName - organization - public boolean hasRepositoryPermission(String repositoryName)
public Set<String> listToNames(Collection<org.gitlab4j.api.models.Project> repositories)
public boolean isPublicRepository(String repositoryName)
public org.gitlab4j.api.models.User loadUser(String username)
public org.gitlab4j.api.models.Group loadOrganization(String organization)
public org.gitlab4j.api.models.Project loadRepository(String repositoryName)
public GitLabOAuthUserDetails getUserDetails(String username)
public List<org.gitlab4j.api.models.Project> getGroupProjects(org.gitlab4j.api.models.Group group)
Copyright © 2016–2022. All rights reserved.