public class GitLabAuthenticationToken
extends org.acegisecurity.providers.AbstractAuthenticationToken
| Constructor and Description |
|---|
GitLabAuthenticationToken(String accessToken,
String gitlabServer,
org.gitlab.api.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.
|
org.acegisecurity.GrantedAuthority[] |
getAuthorities() |
Object |
getCredentials() |
org.gitlab.api.GitlabAPI |
getGitLabAPI() |
List<org.gitlab.api.models.GitlabProject> |
getGroupProjects(org.gitlab.api.models.GitlabGroup group) |
org.gitlab.api.models.GitlabUser |
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.gitlab.api.models.GitlabProject> repositories) |
org.gitlab.api.models.GitlabGroup |
loadOrganization(String organization) |
org.gitlab.api.models.GitlabProject |
loadRepository(String repositoryName) |
org.gitlab.api.models.GitlabUser |
loadUser(String username) |
Set<String> |
myRepositories() |
equals, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringpublic GitLabAuthenticationToken(String accessToken, String gitlabServer, org.gitlab.api.TokenType tokenType) throws IOException
IOExceptionpublic static void clearCaches()
public String getAccessToken()
public org.gitlab.api.GitlabAPI getGitLabAPI()
public org.acegisecurity.GrantedAuthority[] getAuthorities()
getAuthorities in interface org.acegisecurity.AuthenticationgetAuthorities in class org.acegisecurity.providers.AbstractAuthenticationTokenpublic Object getCredentials()
public String getPrincipal()
public org.gitlab.api.models.GitlabUser getMyself()
public boolean hasOrganizationPermission(String candidateName, String organization)
candidateName - organization - public boolean hasRepositoryPermission(String repositoryName)
public Set<String> listToNames(Collection<org.gitlab.api.models.GitlabProject> repositories) throws IOException
IOExceptionpublic boolean isPublicRepository(String repositoryName)
public org.gitlab.api.models.GitlabUser loadUser(String username)
public org.gitlab.api.models.GitlabGroup loadOrganization(String organization)
public org.gitlab.api.models.GitlabProject loadRepository(String repositoryName)
public GitLabOAuthUserDetails getUserDetails(String username)
public List<org.gitlab.api.models.GitlabProject> getGroupProjects(org.gitlab.api.models.GitlabGroup group)
Copyright © 2016–2018. All rights reserved.