Class GithubAuthenticationToken

java.lang.Object
org.acegisecurity.providers.AbstractAuthenticationToken
org.jenkinsci.plugins.GithubAuthenticationToken
All Implemented Interfaces:
Serializable, Principal, Authentication

public class GithubAuthenticationToken extends AbstractAuthenticationToken
Author:
mocleiri to hold the authentication token from the github oauth process.
See Also:
  • Field Details

    • CACHE_EXPIRY

      public static final TimeUnit CACHE_EXPIRY
  • Constructor Details

  • Method Details

    • clearCaches

      public static void clearCaches()
      Necessary for testing
    • clearCacheForUser

      public static void clearCacheForUser(String userName)
      Clear caches by username for use in new logins
    • getAuthorities

      public GrantedAuthority[] getAuthorities()
      Specified by:
      getAuthorities in interface Authentication
      Overrides:
      getAuthorities in class AbstractAuthenticationToken
    • getCredentials

      public Object getCredentials()
    • getPrincipal

      public String getPrincipal()
      Returns the login name in GitHub.
      Returns:
      principal
    • getMyself

      public org.kohsuke.github.GHMyself getMyself() throws IOException
      Returns the GHMyself object from this instance.
      Returns:
      myself
      Throws:
      IOException