code: protected void decideIfCredentialPasswordShouldBeReleasedAsAttribute(final Map<String, List<Object>> attributes, final Authentication authentication,
                                                                           final RegisteredService service) {
          val policy = service.getAttributeReleasePolicy();
          val isAuthorized = policy != null && policy.isAuthorizedToReleaseCredentialPassword();
  
          val element = CollectionUtils.firstElement(authentication.getAttributes().get(CasViewConstants.MODEL_ATTRIBUTE_NAME_PRINCIPAL_CREDENTIAL));
          val credential = element.map(Object::toString).orElse(null);
          decideAttributeReleaseBasedOnServiceAttributePolicy(attributes, credential,
              CasViewConstants.MODEL_ATTRIBUTE_NAME_PRINCIPAL_CREDENTIAL, service, isAuthorized);
      }
docs: Decide if credential password should be released as attribute.
  The credential must have been cached as an authentication attribute
  and the attribute release policy must be allowed to release the
  attribute.
  
  @param attributes     the attributes
  @param authentication the authentication
  @param service        the service