public class CasSecurityRealm extends SecurityRealm
Modifier and Type | Class and Description |
---|---|
static class |
CasSecurityRealm.DescriptorImpl |
SecurityRealm.SecurityComponents
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
CasProtocol |
casProtocol |
String |
casServerUrl |
static String |
DEFAULT_COMMENCE_LOGIN_URL |
static String |
DEFAULT_FAILED_LOGIN_URL |
static String |
DEFAULT_FINISH_LOGIN_URL |
Boolean |
enableLogoutRedirect |
Boolean |
enableRestApi |
Boolean |
enableSingleSignOut |
Boolean |
forceRenewal |
AUTHENTICATED_AUTHORITY, AUTHENTICATED_AUTHORITY2, LIST, NO_AUTHENTICATION
Constructor and Description |
---|
CasSecurityRealm(String casServerUrl,
CasProtocol casProtocol,
Boolean forceRenewal,
Boolean enableSingleSignOut)
Deprecated.
|
CasSecurityRealm(String casServerUrl,
CasProtocol casProtocol,
Boolean forceRenewal,
Boolean enableSingleSignOut,
Boolean enableRestApi)
Deprecated.
|
CasSecurityRealm(String casServerUrl,
CasProtocol casProtocol,
Boolean forceRenewal,
Boolean enableSingleSignOut,
Boolean enableRestApi,
Boolean enableLogoutRedirect) |
Modifier and Type | Method and Description |
---|---|
javax.servlet.Filter |
createFilter(javax.servlet.FilterConfig filterConfig)
Build the filter that will validate the service ticket returned by CAS.
|
SecurityRealm.SecurityComponents |
createSecurityComponents()
Build a authentication manager which uses the CAS REST API for username and password based authentication against
the REST API.
|
void |
doCommenceLogin(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
The login process starts from here, using the CasAuthenticationEntryPoint.
|
void |
doFinishLogin(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
The login process finishes here, by firing the authenticated event.
|
void |
doLogout(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Handles the logout processing.
|
protected org.springframework.context.ApplicationContext |
getApplicationContext()
Create the Spring application context that will hold CAS filters.
|
static String |
getFailedLoginUrl()
Get the URL to redirect to in case of authentication failure.
|
static String |
getFinishLoginUrl()
Get the callback URL after CAS authentication.
|
static String |
getJenkinsUrl()
Get the root Jenkins URL configured in global settings.
|
static String |
getJenkinsUrl(javax.servlet.http.HttpServletRequest req)
Get the root Jenkins URL configured in global settings, or construct it
from the current HTTP request.
|
String |
getLoginUrl()
Login begins with our
doCommenceLogin(StaplerRequest, StaplerResponse) method. |
protected String |
getPostLogOutUrl2(org.kohsuke.stapler.StaplerRequest req,
org.springframework.security.core.Authentication auth)
Logout redirects to CAS before coming back to Jenkins (unless disabled).
|
static String |
getServiceUrl(javax.servlet.http.HttpServletRequest req,
org.springframework.security.cas.ServiceProperties serviceProperties)
Get the full service URL for use with CAS.
|
all, allowsSignup, canLogOut, commenceSignup, commonFilters, createCliAuthenticator, doCaptcha, getAuthenticationGatewayUrl, getCaptchaSupport, getCaptchaSupportDescriptors, getDescriptor, getFrom, getGroupIdStrategy, getPostLogOutUrl, getSecurityComponents, getUserIdStrategy, loadGroupByGroupname, loadGroupByGroupname, loadGroupByGroupname2, loadUserByUsername, loadUserByUsername2, setCaptchaSupport, validateCaptcha
public static final String DEFAULT_COMMENCE_LOGIN_URL
public static final String DEFAULT_FINISH_LOGIN_URL
public static final String DEFAULT_FAILED_LOGIN_URL
public final String casServerUrl
public final CasProtocol casProtocol
public final Boolean forceRenewal
public final Boolean enableSingleSignOut
public final Boolean enableRestApi
public final Boolean enableLogoutRedirect
@Deprecated public CasSecurityRealm(String casServerUrl, CasProtocol casProtocol, Boolean forceRenewal, Boolean enableSingleSignOut)
@Deprecated public CasSecurityRealm(String casServerUrl, CasProtocol casProtocol, Boolean forceRenewal, Boolean enableSingleSignOut, Boolean enableRestApi)
public static String getJenkinsUrl()
public static String getJenkinsUrl(javax.servlet.http.HttpServletRequest req)
req
- current HTTP requestpublic static String getFinishLoginUrl()
public static String getFailedLoginUrl()
public static String getServiceUrl(javax.servlet.http.HttpServletRequest req, org.springframework.security.cas.ServiceProperties serviceProperties)
req
- current HTTP requestserviceProperties
- service propertiesprotected org.springframework.context.ApplicationContext getApplicationContext()
public String getLoginUrl()
doCommenceLogin(StaplerRequest, StaplerResponse)
method.getLoginUrl
in class SecurityRealm
protected String getPostLogOutUrl2(org.kohsuke.stapler.StaplerRequest req, org.springframework.security.core.Authentication auth)
getPostLogOutUrl2
in class SecurityRealm
public SecurityRealm.SecurityComponents createSecurityComponents()
createSecurityComponents
in class SecurityRealm
public javax.servlet.Filter createFilter(javax.servlet.FilterConfig filterConfig)
createFilter
in class SecurityRealm
public void doLogout(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
doLogout
in class SecurityRealm
req
- requestrsp
- responseIOException
- I/O errorjavax.servlet.ServletException
- Servlet errorpublic void doCommenceLogin(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
req
- requestrsp
- responseIOException
- I/O errorjavax.servlet.ServletException
- Servlet errorpublic void doFinishLogin(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
req
- requestrsp
- responseCopyright © 2016–2023. All rights reserved.