private static ResponseEntity<String> createOutputResponse(final AmazonSecurityTokenServiceProperties amz,
                                                               final Credentials stsCredentials) {
        val properties = new LinkedHashMap<String, String>();
        properties.put(ProfileProperty.AWS_ACCESS_KEY_ID, stsCredentials.accessKeyId());
        properties.put(ProfileProperty.AWS_SECRET_ACCESS_KEY, stsCredentials.secretAccessKey());
        properties.put(ProfileProperty.AWS_SESSION_TOKEN, stsCredentials.sessionToken());
        properties.put(ProfileProperty.REGION, StringUtils.isBlank(amz.getRegion()) ? Region.AWS_GLOBAL.id() : Region.of(amz.getRegion()).id());

        val output = new StringBuilder("[default]\n");
        properties.forEach((key, value) -> output.append(String.format("%s=%s%n", key, value)));
        return ResponseEntity.ok(output.toString());
    }
This is {@link AmazonSecurityTokenServiceEndpoint}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-aws/src/main/java/org/apereo/cas/aws/AmazonSecurityTokenServiceEndpoint.java