Package org.apereo.cas.services
Class RegisteredServiceAccessStrategyUtils
- java.lang.Object
-
- org.apereo.cas.services.RegisteredServiceAccessStrategyUtils
-
public class RegisteredServiceAccessStrategyUtils extends java.lang.Object
This isRegisteredServiceAccessStrategyUtils
that encapsulates common operations relevant to registered service access strategy and authorizations. This is a support utility class that acts as a façade around common authorization and access strategy presented in CAS.- Since:
- 5.0.0
-
-
Constructor Summary
Constructors Constructor Description RegisteredServiceAccessStrategyUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
ensureServiceAccessIsAllowed(java.lang.String service, org.apereo.cas.services.RegisteredService registeredService)
Ensure service access is allowed.static void
ensureServiceAccessIsAllowed(org.apereo.cas.authentication.principal.Service service, org.apereo.cas.services.RegisteredService registeredService)
Ensure service access is allowed.static void
ensureServiceAccessIsAllowed(org.apereo.cas.services.RegisteredService registeredService)
Ensure service access is allowed.static boolean
ensureServiceIsNotExpired(org.apereo.cas.services.RegisteredService registeredService)
Ensure service is not expired.static void
ensureServiceSsoAccessIsAllowed(org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.ticket.TicketGrantingTicket ticketGrantingTicket)
Ensure service sso access is allowed.static void
ensureServiceSsoAccessIsAllowed(org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.ticket.TicketGrantingTicket ticketGrantingTicket, boolean credentialsProvided)
Ensure service sso access is allowed.static java.util.function.Predicate<org.apereo.cas.services.RegisteredService>
getRegisteredServiceExpirationPolicyPredicate()
Returns a predicate that determined whether a service has expired.
-
-
-
Method Detail
-
ensureServiceAccessIsAllowed
public static void ensureServiceAccessIsAllowed(org.apereo.cas.services.RegisteredService registeredService)
Ensure service access is allowed.- Parameters:
registeredService
- the registered service
-
ensureServiceAccessIsAllowed
public static void ensureServiceAccessIsAllowed(java.lang.String service, org.apereo.cas.services.RegisteredService registeredService)
Ensure service access is allowed.- Parameters:
service
- the serviceregisteredService
- the registered service
-
ensureServiceAccessIsAllowed
public static void ensureServiceAccessIsAllowed(org.apereo.cas.authentication.principal.Service service, org.apereo.cas.services.RegisteredService registeredService)
Ensure service access is allowed.- Parameters:
service
- the serviceregisteredService
- the registered service
-
ensureServiceIsNotExpired
public static boolean ensureServiceIsNotExpired(org.apereo.cas.services.RegisteredService registeredService)
Ensure service is not expired.- Parameters:
registeredService
- the service- Returns:
- boolean - true if service is not expired
-
ensureServiceSsoAccessIsAllowed
public static void ensureServiceSsoAccessIsAllowed(org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.ticket.TicketGrantingTicket ticketGrantingTicket)
Ensure service sso access is allowed.- Parameters:
registeredService
- the registered serviceservice
- the serviceticketGrantingTicket
- the ticket granting ticket
-
ensureServiceSsoAccessIsAllowed
public static void ensureServiceSsoAccessIsAllowed(org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.ticket.TicketGrantingTicket ticketGrantingTicket, boolean credentialsProvided)
Ensure service sso access is allowed.- Parameters:
registeredService
- the registered serviceservice
- the serviceticketGrantingTicket
- the ticket granting ticketcredentialsProvided
- the credentials provided
-
getRegisteredServiceExpirationPolicyPredicate
public static java.util.function.Predicate<org.apereo.cas.services.RegisteredService> getRegisteredServiceExpirationPolicyPredicate()
Returns a predicate that determined whether a service has expired.- Returns:
- true if the service is still valid. false if service has expired.
-
-