Package org.jenkinsci.plugins
Class GithubAuthenticationToken
java.lang.Object
org.acegisecurity.providers.AbstractAuthenticationToken
org.jenkinsci.plugins.GithubAuthenticationToken
- All Implemented Interfaces:
Serializable
,Principal
,Authentication
- Author:
- mocleiri to hold the authentication token from the github oauth process.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGithubAuthenticationToken
(String accessToken, String githubServer) GithubAuthenticationToken
(String accessToken, String githubServer, boolean clearUserCache) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
clearCacheForUser
(String userName) Clear caches by username for use in new loginsstatic void
Necessary for testingorg.kohsuke.github.GHMyself
Returns the GHMyself object from this instance.Returns the login name in GitHub.Methods inherited from class org.acegisecurity.providers.AbstractAuthenticationToken
equals, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.acegisecurity.Authentication
toSpring
-
Field Details
-
CACHE_EXPIRY
-
-
Constructor Details
-
GithubAuthenticationToken
- Throws:
IOException
-
GithubAuthenticationToken
public GithubAuthenticationToken(String accessToken, String githubServer, boolean clearUserCache) throws IOException - Throws:
IOException
-
-
Method Details
-
clearCaches
public static void clearCaches()Necessary for testing -
clearCacheForUser
Clear caches by username for use in new logins -
getAuthorities
- Specified by:
getAuthorities
in interfaceAuthentication
- Overrides:
getAuthorities
in classAbstractAuthenticationToken
-
getCredentials
-
getPrincipal
Returns the login name in GitHub.- Returns:
- principal
-
getMyself
Returns the GHMyself object from this instance.- Returns:
- myself
- Throws:
IOException
-