Hi,

Thanks for your answer.

I found this blog a couple of days ago, and I thought all my questions would 
find an answer in this article : 
https://fawnoos.com/2021/08/20/cas64-webflow-extensions/

So I created the src/main/resources/META-INF/spring.factories file starting 
from the directory I just used to successfully build the webapp with my custom 
elements.

Then I pasted the source code of the example about "SomethingConfiguration" in 
"src/main/java/org/example/something/SomethingConfiguration.java"

But when I try to rebuild it, it failed :

./gradlew build

> Task :compileJava FAILED
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:5: 
error: cannot find symbol
public class SomethingConfiguration implements 
CasWebflowExecutionPlanConfigurer {
 ^
 symbol: class CasWebflowExecutionPlanConfigurer
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:3: 
error: cannot find symbol
@Configuration("somethingConfiguration")
 ^
 symbol: class Configuration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:4: 
error: cannot find symbol
@EnableConfigurationProperties(CasConfigurationProperties.class)
 ^
 symbol: class EnableConfigurationProperties
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:8: 
error: cannot find symbol
 private CasConfigurationProperties casProperties;
 ^
 symbol: class CasConfigurationProperties
 location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:12: 
error: cannot find symbol
 private FlowDefinitionRegistry loginFlowDefinitionRegistry;
 ^
 symbol: class FlowDefinitionRegistry
 location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:15: 
error: cannot find symbol
 private ApplicationContext applicationContext;
 ^
 symbol: class ApplicationContext
 location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:18: 
error: cannot find symbol
 private FlowBuilderServices flowBuilderServices;
 ^
 symbol: class FlowBuilderServices
 location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:22: 
error: cannot find symbol
 public CasWebflowConfigurer somethingWebflowConfigurer() {
 ^
 symbol: class CasWebflowConfigurer
 location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:28: 
error: cannot find symbol
 public void configureWebflowExecutionPlan(final CasWebflowExecutionPlan plan) {
 ^
 symbol: class CasWebflowExecutionPlan
 location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:4: 
error: cannot find symbol
@EnableConfigurationProperties(CasConfigurationProperties.class)
 ^
 symbol: class CasConfigurationProperties
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:7: 
error: cannot find symbol
 @Autowired
 ^
 symbol: class Autowired
 location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:10: 
error: cannot find symbol
 @Autowired
 ^
 symbol: class Autowired
 location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:11: 
error: cannot find symbol
 @Qualifier("loginFlowRegistry")
 ^
 symbol: class Qualifier
 location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:14: 
error: cannot find symbol
 @Autowired
 ^
 symbol: class Autowired
 location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:17: 
error: cannot find symbol
 @Autowired
 ^
 symbol: class Autowired
 location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:20: 
error: cannot find symbol
 @ConditionalOnMissingBean(name = "somethingWebflowConfigurer")
 ^
 symbol: class ConditionalOnMissingBean
 location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:21: 
error: cannot find symbol
 @Bean
 ^
 symbol: class Bean
 location: class SomethingConfiguration
17 errors   So I followed your recommendantion and addes "import" directives in 
my source code, class by class.   And when one of them was still causing an 
error, I remembered what Pablo 
Le 31-Jan-2022 18:03:00 +0100, [email protected] a crit: 
 Examples in the docs are to get an idea of where to start and what to do.  
Checkout https://fawnoos.com/blog/ for other examples.   Ray   On Sat, 
2022-01-29 at 18:29 +0100, [email protected] wrote: 
 Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information. 
  Hi, Thanks for your reply. So are the code examples on this page : 
https://apereo.github.io/cas/6.4.x/webflow/Webflow-Customization-Extensions.html
 supposed to be usable as they are ? Or are they just snippets ? I would like 
to start with a good and simple example, and make it more complex, step by 
step. But I also want to avoid too much trial and errors, and understand what I 
am doing. It seems there is some "automagic" here and there, but not everywhere 
:-) Regards 

Le 28-Jan-2022 19:29:47 +0100, [email protected] a crit: 
 Perhaps the spring libs need to be included in your java file:   import 
org.springframework.beans.factory.annotation.Autowired; import 
org.springframework.beans.factory.annotation.Qualifier; import .... as needed   
You may also need some cas libs as well in your build.gradle (these are some 
that I have):    compileOnly "org.apereo.cas:cas-server-core-configuration"  
compileOnly "org.apereo.cas:cas-server-core-cookie-api"  compileOnly 
"org.apereo.cas:cas-server-core-webflow-api" etc as needed   It is worthwhile 
have the main cas code cloned locally. You can search for the class files and 
references to see how they are used.   As you note, a lot has changed. It may 
be that some of the customization you had is already implemented. So scour the 
docs before you start coding.   Ray   On Thu, 2022-01-27 at 08:58 +0100, 
[email protected] wrote: 
 Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information. 
  Hi, Thank you very much for your answer, it will help me to find my way ! But 
is the SomethingWebflowConfigurer supposed to be usable per se, just to check 
everythin is taken into account ? I am still not able to compile it because of 
these missing symbols errors. Is there something else to add in the 
"build.gradle" or somewhere else ? Regards 

Le 27-Jan-2022 04:35:35 +0100, [email protected] a crit: 
I struggled with the same. With help from this community, going thru some cas 
code, and reading thru springboot docs I was finally able to get thru it. I'll 
try to summarize.   There is a default login webflow already defined for you. 
What I did was let the default flow execute but then intercepted the last 
transition from REAL_SUBMIT -> TickgetGrantingTicket. So now the flow looks 
like DEFAULT_WEBFLOW->REAL_SUBMIT->MY_CUSTOM_WEBFLOW->TICKET_GRANTING_TICKET. 
My custom webflow consist of a dozen or so actions.   1) First you need to 
define a Configurer class, see cas doc  SomethingWebflowConfigurer as an 
example. The main point in hooking your webflow with something like:  
createTransitionForState(realsubmit, CasWebflowConstants.STATE_ID_SUCCESS, , 
true);
 Then create your new action and handling each transition your action is 
capable of returning:  val newActionState = createActionState(flow,  , ); 
//step1Action is the name of your action class Step1Action that you have 
autowired  createTransitionForState(newActionState, 
CasWebflowConstants.STATE_ID_SUCCESS, );
 createTransitionForState(newActionState, "error",  ); //step2Action is the 
name of your action class Step2Action that you have autowired
 createTransitionForState(newActionState, CasWebflowConstants.STATE_ID_SUCCESS, 
CasWebflowConstants.STATE_ID_CREATE_TICKET_GRANTING_TICKET); 
   4) Next, you'll need to tell spring about your configuration. Create a 
spring.factories file inside src/main/resources/META-INF. Include a reference 
to your configurer class: 
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.apereo.cas.config.Step1Configurer,\ org.apereo.cas.config.Step2Configurer   
Good luck, hope this provides some useful insight. -psv 
     On Wednesday, January 26, 2022 at 10:50:55 AM UTC-6 [email protected] 
wrote: 
 Hi,   I am trying to replace an old CAS 3.5, and having been far from this 
product during all these years, things have changed a lot !   After some trials 
and errors, I was able to clone the overlay repo, extract the fragments I 
needed to customize and build the WAR.   Then I managed to add the required 
dependencies to get a working LDAP auth source (unfortunately without pooling) 
and a JSON services registry, and build a more complete WAR.   But now I am 
facing a problem I can not solve : the old CAS had some customized webflow and 
some Java code to provide dynamic authentication depending on a list of network 
addresses (either direct LDAP or SPNEGO)    I guess adapting this part will be 
something, but right now I am struggling at the very first step !   Wanting to 
give a try to this example : 
https://apereo.github.io/cas/6.4.x/webflow/Webflow-Customization-Extensions.html
 I am not able to compile " SomethingConfiguration" and I get the following 
errors :   
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:5: 
error: cannot find symbol
public class SomethingConfiguration implements 
CasWebflowExecutionPlanConfigurer {
^
symbol: class CasWebflowExecutionPlanConfigurer
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:3: 
error: cannot find symbol
@Configuration("somethingConfiguration")
^
symbol: class Configuration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:4: 
error: cannot find symbol
@EnableConfigurationProperties(CasConfigurationProperties.class)
^
symbol: class EnableConfigurationProperties
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:8: 
error: cannot find symbol
private CasConfigurationProperties casProperties;
^
symbol: class CasConfigurationProperties
location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:12: 
error: cannot find symbol
private FlowDefinitionRegistry loginFlowDefinitionRegistry;
^
symbol: class FlowDefinitionRegistry
location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:15: 
error: cannot find symbol
private ApplicationContext applicationContext;
^
symbol: class ApplicationContext
location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:18: 
error: cannot find symbol
private FlowBuilderServices flowBuilderServices;
^
symbol: class FlowBuilderServices
location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:22: 
error: cannot find symbol
public CasWebflowConfigurer somethingWebflowConfigurer() {
^
symbol: class CasWebflowConfigurer
location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:28: 
error: cannot find symbol
public void configureWebflowExecutionPlan(final CasWebflowExecutionPlan plan) {
^
symbol: class CasWebflowExecutionPlan
location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:4: 
error: cannot find symbol
@EnableConfigurationProperties(CasConfigurationProperties.class)
^
symbol: class CasConfigurationProperties
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:7: 
error: cannot find symbol
@Autowired
^
symbol: class Autowired
location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:10: 
error: cannot find symbol
@Autowired
^
symbol: class Autowired
location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:11: 
error: cannot find symbol
@Qualifier("loginFlowRegistry")
^
symbol: class Qualifier
location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:14: 
error: cannot find symbol
@Autowired
^
symbol: class Autowired
location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:17: 
error: cannot find symbol
@Autowired
^
symbol: class Autowired
location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:20: 
error: cannot find symbol
@ConditionalOnMissingBean(name = "somethingWebflowConfigurer")
^
symbol: class ConditionalOnMissingBean
location: class SomethingConfiguration
/opt/cas/src/main/java/org/example/something/SomethingConfiguration.java:21: 
error: cannot find symbol
@Bean
^
symbol: class Bean
location: class SomethingConfiguration   It seems SpringBoot dependencies are 
not satisfied (I discovered all the concepts ten days ago so I might be wrong) 
but after "finding", "greping" and adding dozens of combinations like these, 
nothing has improved :   implementation 
"org.apereo.cas:cas-server-core-api-configuration-model:${project.'cas.version'}"
implementation 
"org.apereo.cas:cas-server-core-configuration:${project.'cas.version'}"
implementation 
"org.apereo.cas:cas-server-core-webflow-api:${project.'cas.version'}"
implementation "org.apereo.cas:cas-server-core-web-api:${project.'cas.version'}"
implementation "org.apereo.cas:cas-server-core-util:${project.'cas.version'}"
implementation 
"org.apereo.cas:cas-server-core-configuration-api:${project.'cas.version'}"   I 
used the "build.gradle" provided in the repo, just adding dependencies for LDAP 
and JSON.   Can somebody tell me what I am missing ?    Regards 
FreeMail powered by  mail.fr  

  -- 
- 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/07382b33-b549-48fe-bdbe-1a6d345e71fen%40apereo.org.
  

-------------------------------------------------------------------------------------------------
FreeMail powered by  mail.fr 

--  Ray Bon Programmer Analyst Development Services, University Systems 
2507218831 | CLE 019 |  [email protected]   I acknowledge and respect the lək̓ʷəŋən 
peoples on whose traditional territory the university stands, and the Songhees, 
Esquimalt and WSNEĆ peoples whose historical relationships with the land 
continue to this day.    

-------------------------------------------------------------------------------------------------
FreeMail powered by mail.fr 

--  Ray Bon Programmer Analyst Development Services, University Systems 
2507218831 | CLE 019 | [email protected]   I acknowledge and respect the lək̓ʷəŋən 
peoples on whose traditional territory the university stands, and the Songhees, 
Esquimalt and WSNEĆ peoples whose historical relationships with the land 
continue to this day.   

-------------------------------------------------------------------------------------------------
FreeMail powered by mail.fr

-- 
- 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/20220202111956.BB4B4C00A8%40smtp04.mail.de.

Reply via email to