Hi,
I want to extend OAuth Configuration like this:
https://apereo.github.io/cas/development/installation/OAuth-OpenId-Authentication.html#custom

I created classes in WAR Overlay (clone from 
https://github.com/apereo/cas-overlay-template branch master):
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();
        }
    }
}


But I can't compile this code, because Gradle/IntelliJ cannot find 
dependencies:

import org.apereo.cas.configuration.CasConfigurationProperties;
import 
org.apereo.cas.support.oauth.web.views.OAuth20UserProfileViewRenderer;
import org.apereo.cas.ticket.accesstoken.AccessToken;

I added missing dependencies manually (but I can't find info about this in 
documentation):

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'}"


*cas.version=6.1.0-RC5-SNAPSHOT*
Gradle cannot find dependencies:
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.

Gradle found dependencies from old version (6.0.4) but it is not compatible:
{
  "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."
    }
  ]
}

What am I doing wrong?


-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/4f4aa8d7-10b9-4428-8778-a0825aff1078%40apereo.org.

Reply via email to