@Override
    public String rawKey(final String type) {
        var withoutNamespace = StringUtils.remove(type, this.namespace + ':');
        return ticketCatalog.findAll()
            .stream()
            .filter(ticketDefinition -> withoutNamespace.startsWith(ticketDefinition.getPrefix() + ':'))
            .findFirst()
            .map(ticketDefinition -> StringUtils.removeStart(withoutNamespace, ticketDefinition.getPrefix() + ':'))
            .orElse(withoutNamespace);
    }
This is {@link DefaultRedisKeyGenerator}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-redis-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/key/DefaultRedisKeyGenerator.java