public class GithubSecurityRealm
extends hudson.security.AbstractPasswordBasedSecurityRealm
implements org.acegisecurity.userdetails.UserDetailsService
| Modifier and Type | Class and Description |
|---|---|
static class |
GithubSecurityRealm.ConverterImpl |
static class |
GithubSecurityRealm.DescriptorImpl |
| Constructor and Description |
|---|
GithubSecurityRealm(String githubWebUri,
String githubApiUri,
String clientID,
String clientSecret,
String oauthScopes) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsSignup() |
protected GithubOAuthUserDetails |
authenticate(String username,
String password) |
hudson.security.SecurityRealm.SecurityComponents |
createSecurityComponents() |
org.kohsuke.stapler.HttpResponse |
doCommenceLogin(org.kohsuke.stapler.StaplerRequest request,
String from,
String referer) |
org.kohsuke.stapler.HttpResponse |
doFinishLogin(org.kohsuke.stapler.StaplerRequest request)
This is where the user comes back to at the end of the OAuth redirect
ping-pong.
|
boolean |
equals(Object object)
Compare an object against this instance for equivalence.
|
String |
getClientID() |
hudson.util.Secret |
getClientSecret() |
GithubSecurityRealm.DescriptorImpl |
getDescriptor() |
String |
getGithubApiUri() |
String |
getGithubUri()
Deprecated.
use
getGithubWebUri() instead. |
String |
getGithubWebUri() |
String |
getLoginUrl() |
String |
getOauthScopes() |
protected String |
getPostLogOutUrl(org.kohsuke.stapler.StaplerRequest req,
org.acegisecurity.Authentication auth) |
int |
hashCode() |
boolean |
hasScope(String scope)
Checks the security realm for a GitHub OAuth scope.
|
hudson.security.GroupDetails |
loadGroupByGroupname(String groupName) |
org.acegisecurity.userdetails.UserDetails |
loadUserByUsername(String username) |
authenticate2, loadGroupByGroupname2, loadUserByUsername2all, canLogOut, commenceSignup, commonFilters, createCliAuthenticator, createFilter, doCaptcha, doLogout, getAuthenticationGatewayUrl, getCaptchaSupport, getCaptchaSupportDescriptors, getFrom, getGroupIdStrategy, getPostLogOutUrl2, getSecurityComponents, getUserIdStrategy, loadGroupByGroupname, setCaptchaSupport, validateCaptcha@DataBoundConstructor public GithubSecurityRealm(String githubWebUri, String githubApiUri, String clientID, String clientSecret, String oauthScopes)
githubWebUri - The URI to the root of the web UI for GitHub or GitHub Enterprise,
including the protocol (e.g. https).githubApiUri - The URI to the root of the API for GitHub or GitHub Enterprise,
including the protocol (e.g. https).clientID - The client ID for the created OAuth Application.clientSecret - The client secret for the created GitHub OAuth Application.oauthScopes - A comma separated list of OAuth Scopes to request access to.public boolean hasScope(String scope)
scope - A scope to check for in the security realm.public String getGithubApiUri()
public String getGithubWebUri()
@Deprecated public String getGithubUri()
getGithubWebUri() instead.public String getClientID()
public hudson.util.Secret getClientSecret()
public String getOauthScopes()
public org.kohsuke.stapler.HttpResponse doCommenceLogin(org.kohsuke.stapler.StaplerRequest request,
@QueryParameter
String from,
@Header(value="Referer")
String referer)
throws IOException
IOExceptionpublic org.kohsuke.stapler.HttpResponse doFinishLogin(org.kohsuke.stapler.StaplerRequest request)
throws IOException
IOExceptionpublic boolean allowsSignup()
allowsSignup in class hudson.security.SecurityRealmpublic hudson.security.SecurityRealm.SecurityComponents createSecurityComponents()
createSecurityComponents in class hudson.security.AbstractPasswordBasedSecurityRealmprotected GithubOAuthUserDetails authenticate(String username, String password) throws org.acegisecurity.AuthenticationException
authenticate in class hudson.security.AbstractPasswordBasedSecurityRealmorg.acegisecurity.AuthenticationExceptionpublic String getLoginUrl()
getLoginUrl in class hudson.security.SecurityRealmprotected String getPostLogOutUrl(org.kohsuke.stapler.StaplerRequest req, org.acegisecurity.Authentication auth)
getPostLogOutUrl in class hudson.security.SecurityRealmpublic GithubSecurityRealm.DescriptorImpl getDescriptor()
getDescriptor in interface hudson.model.Describable<hudson.security.SecurityRealm>getDescriptor in class hudson.security.SecurityRealmpublic org.acegisecurity.userdetails.UserDetails loadUserByUsername(String username) throws org.acegisecurity.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
loadUserByUsername in interface org.acegisecurity.userdetails.UserDetailsServiceloadUserByUsername in class hudson.security.AbstractPasswordBasedSecurityRealmusername - username to lookuporg.acegisecurity.userdetails.UsernameNotFoundExceptionorg.springframework.dao.DataAccessExceptionpublic boolean equals(Object object)
public hudson.security.GroupDetails loadGroupByGroupname(String groupName) throws org.acegisecurity.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
loadGroupByGroupname in class hudson.security.AbstractPasswordBasedSecurityRealmgroupName - groupName to look uporg.acegisecurity.userdetails.UsernameNotFoundExceptionorg.springframework.dao.DataAccessExceptionCopyright © 2016–2022. All rights reserved.