Class PinnableCookieProperties
java.lang.Object
org.apereo.cas.configuration.model.support.cookie.CookieProperties
org.apereo.cas.configuration.model.support.cookie.PinnableCookieProperties
- All Implemented Interfaces:
Serializable
,CasFeatureModule
- Direct Known Subclasses:
CookieSessionReplicationProperties
,InterruptCookieProperties
,MultifactorAuthenticationProviderSelectionCookieProperties
,TicketGrantingCookieProperties
,WsFederationDelegatedCookieProperties
@RequiresModule(name="cas-server-core-cookie",
automated=true)
public class PinnableCookieProperties
extends CookieProperties
Base property class for cookies that can be pinned to the HTTP session.
Pinned cookies are ignored if they arrive on a request with different attributes, such as IP address or user-agent,
than what was present when the cookie was created.
- Since:
- 6.4.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apereo.cas.configuration.features.CasFeatureModule
CasFeatureModule.FeatureCatalog
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA regular expression pattern that indicates the set of allowed IP addresses, whenisPinToSession()
is configured.boolean
When set totrue
and assumingisPinToSession()
is alsotrue
, client sessions (using the client IP address) are geo-located using a geolocation service when/if configured.boolean
When generating cookie values, determine whether the value should be compounded and signed with the properties of the current session, such as IP address, user-agent, etc.setAllowedIpAddressesPattern
(String allowedIpAddressesPattern) A regular expression pattern that indicates the set of allowed IP addresses, whenisPinToSession()
is configured.setGeoLocateClientSession
(boolean geoLocateClientSession) When set totrue
and assumingisPinToSession()
is alsotrue
, client sessions (using the client IP address) are geo-located using a geolocation service when/if configured.setPinToSession
(boolean pinToSession) When generating cookie values, determine whether the value should be compounded and signed with the properties of the current session, such as IP address, user-agent, etc.Methods inherited from class org.apereo.cas.configuration.model.support.cookie.CookieProperties
getDomain, getMaxAge, getName, getPath, getSameSitePolicy, isHttpOnly, isSecure, setDomain, setHttpOnly, setMaxAge, setName, setPath, setSameSitePolicy, setSecure
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apereo.cas.configuration.features.CasFeatureModule
isDefined, isUndefined
-
Constructor Details
-
PinnableCookieProperties
public PinnableCookieProperties()
-
-
Method Details
-
isPinToSession
public boolean isPinToSession()When generating cookie values, determine whether the value should be compounded and signed with the properties of the current session, such as IP address, user-agent, etc. -
getAllowedIpAddressesPattern
A regular expression pattern that indicates the set of allowed IP addresses, whenisPinToSession()
is configured. In the event that there is a mismatch between the cookie IP address and the current request-provided IP address (i.e. network switches, VPN, etc), the cookie can still be considered valid if the new IP address matches the pattern specified here. -
isGeoLocateClientSession
public boolean isGeoLocateClientSession()When set totrue
and assumingisPinToSession()
is alsotrue
, client sessions (using the client IP address) are geo-located using a geolocation service when/if configured. The resulting session is either pinned to the client geolocation, or the default client address. -
setPinToSession
When generating cookie values, determine whether the value should be compounded and signed with the properties of the current session, such as IP address, user-agent, etc.- Returns:
this
.
-
setAllowedIpAddressesPattern
A regular expression pattern that indicates the set of allowed IP addresses, whenisPinToSession()
is configured. In the event that there is a mismatch between the cookie IP address and the current request-provided IP address (i.e. network switches, VPN, etc), the cookie can still be considered valid if the new IP address matches the pattern specified here.- Returns:
this
.
-
setGeoLocateClientSession
When set totrue
and assumingisPinToSession()
is alsotrue
, client sessions (using the client IP address) are geo-located using a geolocation service when/if configured. The resulting session is either pinned to the client geolocation, or the default client address.- Returns:
this
.
-