org.jenkinsci.plugins
Class GithubSecurityRealm
java.lang.Object
hudson.model.AbstractDescribableImpl<hudson.security.SecurityRealm>
hudson.security.SecurityRealm
org.jenkinsci.plugins.GithubSecurityRealm
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<hudson.security.SecurityRealm>
public class GithubSecurityRealm
- extends hudson.security.SecurityRealm
Implementation of the AbstractPasswordBasedSecurityRealm that uses github
oauth to verify the user can login.
This is based on the MySQLSecurityRealm from the mysql-auth-plugin written by
Alex Ackerman.
| Nested classes/interfaces inherited from class hudson.security.SecurityRealm |
hudson.security.SecurityRealm.SecurityComponents |
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Fields inherited from class hudson.security.SecurityRealm |
AUTHENTICATED_AUTHORITY, LIST, NO_AUTHENTICATION |
| Methods inherited from class hudson.security.SecurityRealm |
all, canLogOut, commenceSignup, createCliAuthenticator, createFilter, doCaptcha, doLogout, findBean, getAuthenticationGatewayUrl, getCaptchaSupport, getCaptchaSupportDescriptors, getDescriptor, getPostLogOutUrl, getSecurityComponents, setCaptchaSupport, validateCaptcha |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GithubSecurityRealm
@DataBoundConstructor
public GithubSecurityRealm(String githubUri,
String clientID,
String clientSecret)
getGithubUri
public String getGithubUri()
- Returns:
- the uri to Github (varies for Github Enterprise Edition)
getClientID
public String getClientID()
- Returns:
- the clientID
getClientSecret
public String getClientSecret()
- Returns:
- the clientSecret
doCommenceLogin
public org.kohsuke.stapler.HttpResponse doCommenceLogin(org.kohsuke.stapler.StaplerRequest request,
@Header(value="Referer")
String referer)
throws IOException
- Throws:
IOException
doFinishLogin
public org.kohsuke.stapler.HttpResponse doFinishLogin(org.kohsuke.stapler.StaplerRequest request)
throws IOException
- This is where the user comes back to at the end of the OpenID redirect
ping-pong.
- Throws:
IOException
allowsSignup
public boolean allowsSignup()
- Overrides:
allowsSignup in class hudson.security.SecurityRealm
createSecurityComponents
public hudson.security.SecurityRealm.SecurityComponents createSecurityComponents()
- Specified by:
createSecurityComponents in class hudson.security.SecurityRealm
getLoginUrl
public String getLoginUrl()
- Overrides:
getLoginUrl in class hudson.security.SecurityRealm
loadUserByUsername
public org.acegisecurity.userdetails.UserDetails loadUserByUsername(String username)
throws org.acegisecurity.userdetails.UsernameNotFoundException,
org.springframework.dao.DataAccessException
- Overrides:
loadUserByUsername in class hudson.security.SecurityRealm
- Parameters:
username -
- Returns:
-
- Throws:
org.acegisecurity.userdetails.UsernameNotFoundException
org.springframework.dao.DataAccessException
loadGroupByGroupname
public hudson.security.GroupDetails loadGroupByGroupname(String groupName)
throws org.acegisecurity.userdetails.UsernameNotFoundException,
org.springframework.dao.DataAccessException
- Overrides:
loadGroupByGroupname in class hudson.security.SecurityRealm
- Parameters:
groupName -
- Returns:
-
- Throws:
org.acegisecurity.userdetails.UsernameNotFoundException
org.springframework.dao.DataAccessException
Copyright © 2004-2012. All Rights Reserved.