package com.example.cas.custom;
import org.springframework.boot.context.properties.EnableConfigurationProperties;import org.springframework.cloud.context.config.annotation.RefreshScope;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;
import java.util.List;import java.util.Map;import java.util.stream.Collectors;
@Configuration("MyOAuthConfiguration")@EnableConfigurationProperties(CasConfigurationProperties.class)public class MyOAuthConfiguration {
@Bean @RefreshScope public OAuth20UserProfileViewRenderer oauthUserProfileViewRenderer() { return new CustomOAuthRenderer(); }
public class CustomOAuthRenderer implements OAuth20UserProfileViewRenderer {
@Override public String render(Map<String, Object> model, AccessToken accessToken) { return model.toString(); } }}
import org.apereo.cas.configuration.CasConfigurationProperties;import org.apereo.cas.support.oauth.web.views.OAuth20UserProfileViewRenderer;import org.apereo.cas.ticket.accesstoken.AccessToken;compile "org.apereo.cas:cas-core-api-configuration-model:${project.'cas.version'}"compile "org.apereo.cas:cas-server-support-oauth:${project.'cas.version'}"compile "org.apereo.cas:cas-server-support-oauth-api:${project.'cas.version'}"Execution failed for task ':compileJava'.> Could not resolve all files for configuration ':compileClasspath'. > Could not find org.apereo.cas:cas-core-api-configuration-model:6.1.0-RC5-SNAPSHOT.{ "errors": [ { "status": 409, "message": "The repository 'oss-snapshot-local' rejected the resolution of an artifact 'oss-snapshot-local:org/apereo/cas/cas-core-api-configuration-model/6.0.4/cas-core-api-configuration-model-6.0.4.pom' due to conflict in the snapshot release handling policy." } ]}