protected String encryptResolvedUsername(final RegisteredServiceUsernameProviderContext context, final String username) {
        val cipher = context.getApplicationContext().getBean(RegisteredServiceCipherExecutor.DEFAULT_BEAN_NAME, RegisteredServiceCipherExecutor.class);
        return cipher.encode(username, Optional.of(context.getRegisteredService()));
    }
Initializes the registered service with default values
for fields that are unspecified. Only triggered by JPA.
core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/BaseRegisteredServiceUsernameAttributeProvider.java