org.jenkinsci.plugins
Class GithubAuthenticationToken

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

public class GithubAuthenticationToken
extends org.acegisecurity.providers.AbstractAuthenticationToken

Author:
mocleiri to hold the authentication token from the github oauth process.
See Also:
Serialized Form

Constructor Summary
GithubAuthenticationToken(String accessToken)
           
 
Method Summary
 Object getCredentials()
           
 Object getPrincipal()
           
 boolean hasOrganizationPermission(String candidateName, String organization)
          For some reason I can't get the github api to tell me for the current user the groups to which he belongs.
 
Methods inherited from class org.acegisecurity.providers.AbstractAuthenticationToken
equals, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GithubAuthenticationToken

public GithubAuthenticationToken(String accessToken)
Method Detail

getCredentials

public Object getCredentials()

getPrincipal

public Object getPrincipal()

hasOrganizationPermission

public boolean hasOrganizationPermission(String candidateName,
                                         String organization)
For some reason I can't get the github api to tell me for the current user the groups to which he belongs. So this is a slightly larger consideration. If the authenticated user is part of any team within the organization then they have permission.

Parameters:
candidateName -
organization -
Returns:


Copyright © 2004-2011. All Rights Reserved.