@Override
    public boolean shouldBypassTrustedDevice(final RegisteredService registeredService,
                                             final Service service,
                                             final Authentication authentication) throws Throwable {
        if (registeredService == null && service == null) {
            return false;
        }

        val audit = AuditableContext.builder()
            .service(service)
            .authentication(authentication)
            .registeredService(registeredService)
            .build();
        val accessResult = this.registeredServiceAccessStrategyEnforcer.execute(audit);
        accessResult.throwExceptionIfNeeded();

        val mfaPolicy = Optional.ofNullable(registeredService).map(RegisteredService::getMultifactorAuthenticationPolicy).orElse(null);
        return mfaPolicy != null && mfaPolicy.isBypassTrustedDeviceEnabled();
    }
This is {@link DefaultMultifactorAuthenticationTrustedDeviceBypassEvaluator}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-trusted-mfa-core/src/main/java/org/apereo/cas/trusted/authentication/DefaultMultifactorAuthenticationTrustedDeviceBypassEvaluator.java