Package org.springframework.security.cas
Class ServiceProperties
- java.lang.Object
-
- org.springframework.security.cas.ServiceProperties
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
SamlServiceProperties
public class ServiceProperties extends java.lang.Object implements org.springframework.beans.factory.InitializingBeanStores properties related to this CAS service.Each web application capable of processing CAS tickets is known as a service. This class stores the properties that are relevant to the local CAS service, being the application that is being secured by Spring Security.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_CAS_ARTIFACT_PARAMETERstatic java.lang.StringDEFAULT_CAS_SERVICE_PARAMETER
-
Constructor Summary
Constructors Constructor Description ServiceProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()java.lang.StringgetArtifactParameter()java.lang.StringgetService()Represents the service the user is authenticating to.java.lang.StringgetServiceParameter()Configures the Request parameter to look for when attempting to send a request to CAS.booleanisAuthenticateAllArtifacts()booleanisSendRenew()Indicates whether therenewparameter should be sent to the CAS login URL and CAS validation URL.voidsetArtifactParameter(java.lang.String artifactParameter)Configures the Request Parameter to look for when attempting to see if a CAS ticket was sent from the server.voidsetAuthenticateAllArtifacts(boolean authenticateAllArtifacts)If true, then any non-null artifact (ticket) should be authenticated.voidsetSendRenew(boolean sendRenew)voidsetService(java.lang.String service)voidsetServiceParameter(java.lang.String serviceParameter)
-
-
-
Field Detail
-
DEFAULT_CAS_ARTIFACT_PARAMETER
public static final java.lang.String DEFAULT_CAS_ARTIFACT_PARAMETER
- See Also:
- Constant Field Values
-
DEFAULT_CAS_SERVICE_PARAMETER
public static final java.lang.String DEFAULT_CAS_SERVICE_PARAMETER
- See Also:
- Constant Field Values
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
getService
public final java.lang.String getService()
Represents the service the user is authenticating to.This service is the callback URL belonging to the local Spring Security System for Spring secured application. For example,
https://www.mycompany.com/application/login/cas
- Returns:
- the URL of the service the user is authenticating to
-
isSendRenew
public final boolean isSendRenew()
Indicates whether therenewparameter should be sent to the CAS login URL and CAS validation URL.If
true, it will force CAS to authenticate the user again (even if the user has previously authenticated). During ticket validation it will require the ticket was generated as a consequence of an explicit login. High security applications would probably set this totrue. Defaults tofalse, providing automated single sign on.- Returns:
- whether to send the
renewparameter to CAS
-
setSendRenew
public final void setSendRenew(boolean sendRenew)
-
setService
public final void setService(java.lang.String service)
-
getArtifactParameter
public final java.lang.String getArtifactParameter()
-
setArtifactParameter
public final void setArtifactParameter(java.lang.String artifactParameter)
Configures the Request Parameter to look for when attempting to see if a CAS ticket was sent from the server.- Parameters:
artifactParameter- the id to use. Default is "ticket".
-
getServiceParameter
public final java.lang.String getServiceParameter()
Configures the Request parameter to look for when attempting to send a request to CAS.- Returns:
- the service parameter to use. Default is "service".
-
setServiceParameter
public final void setServiceParameter(java.lang.String serviceParameter)
-
isAuthenticateAllArtifacts
public final boolean isAuthenticateAllArtifacts()
-
setAuthenticateAllArtifacts
public final void setAuthenticateAllArtifacts(boolean authenticateAllArtifacts)
If true, then any non-null artifact (ticket) should be authenticated. Additionally, the service will be determined dynamically in order to ensure the service matches the expected value for this artifact.- Parameters:
authenticateAllArtifacts-
-
-