CasHelper::CA_* constants deprecated in favour of SslCertificateVerification enum
CasHelper::CA_DEFAULT, CasHelper::CA_CUSTOM, CasHelper::CA_NONE constants are deprecated and replaced with this enum:
enum SslCertificateVerification: int implements OptionsInterface {
case Default = 0;
case Custom = 1;
case None = 2;
public static function getAsOptions(): array {
return [
SslCertificateVerification::Default->value => t("Verify using your web server's default certificate authority (CA) chain."),
SslCertificateVerification::None->value => t('Do not verify. (Note: this should NEVER be used in production.)'),
SslCertificateVerification::Custom->value => t('Verify using a specific CA certificate. Use the field below to provide path (recommended).'),
];
}
}
CasHelper::GATEWAY_* constants deprecated in favour of GatewayMethod enum
CasHelper::GATEWAY_SERVER_SIDE, CasHelper::GATEWAY_CLIENT_SIDE constants are deprecated in favour of this enum:
enum GatewayMethod: string implements OptionsInterface {
case ServerSide = 'server_side';
case ClientSide = 'client_side';
public static function getAsOptions(): array {
return [
GatewayMethod::ServerSide->value => t('Server-side redirect. Faster, but disables page caching on configured paths.'),
GatewayMethod::ClientSide->value => t('Client-side redirect (using JavaScript). Slower, but works with all page caching. Not compatible with "Every page request" option above.'),
];
}
}
CasHelper::EVENT_* event constants deprecated in favour of event class fully-qualified name
Constants CasHelper::EVENT_PRE_USER_LOAD, CasHelper::EVENT_PRE_USER_LOAD_REDIRECT, CasHelper::EVENT_PRE_REGISTER, CasHelper::EVENT_PRE_LOGIN, CasHelper::EVENT_PRE_REDIRECT, CasHelper::EVENT_PRE_VALIDATE_SERVER_CONFIG, CasHelper::EVENT_PRE_VALIDATE, CasHelper::EVENT_POST_VALIDATE, CasHelper::EVENT_POST_LOGIN event constants are deprecated in favour of event class fully-qualified name
For instance, instead of CasHelper::EVENT_PRE_LOGIN, subscribers should use CasPreLoginEvent::class
CasLoginException constants deprecated in favour of CasLoginExceptionType enum
CasLoginException::NO_LOCAL_ACCOUNT, CasLoginException::SUBSCRIBER_DENIED_REG, CasLoginException::ACCOUNT_BLOCKED, CasLoginException::SUBSCRIBER_DENIED_LOGIN, CasLoginException::ATTRIBUTE_PARSING_ERROR, CasLoginException::USERNAME_ALREADY_EXISTS, CasLoginException::ADMIN_APPROVAL_REQUIRED constants are deprecated in favour of this enum:
enum CasLoginExceptionType: string {
case Unknown = '';
case NoLocalAccount = 'message_no_local_account';
case SubscriberDeniedRegistration = 'message_subscriber_denied_reg';
case AccountBlocked = 'message_account_blocked';
case SubscriberDeniedLogin = 'message_subscriber_denied_login';
case AttributeParsingError = 'message_validation_failure';
case UsernameAlreadyExists = 'message_username_already_exists';
case AdminApprovalRequired = '[no message]';
}
CasUserManager::EMAIL_ASSIGNMENT_* constants deprecated in favour of EmailAssignment enum
CasUserManager::EMAIL_ASSIGNMENT_STANDARD, CasUserManager::EMAIL_ASSIGNMENT_ATTRIBUTE are deprecated in favour of this enum:
enum EmailAssignment: int implements OptionsInterface {
case Standard = 0;
case FromAttribute = 1;
public static function getAsOptions(): array {
return [
EmailAssignment::Standard->value => t('Use the CAS username combined with a custom domain name you specify.'),
EmailAssignment::FromAttribute->value => t("Use a CAS attribute that contains the user's complete email address."),
];
}
}