On 12/02/25 21:54, Mukeya Kassindye wrote:
|Hello everyone,|
|I have a question regarding the login workflow when using Apache Syncope with
the SyncopeClientFactoryBean. In my Jakarta EE application, If I instantiate my
Syncope client as follows:|
|SyncopeClient client = new SyncopeClientFactoryBean().|
|||setAddress(BASE_URL).|
|||create("admin", "password");|
|What I would like to know is how the authentication process works in this
context. For example, when a user wants to log in by providing a username and
password, what is the flow of the login process?|
|More specifically:|
|- Which methods of the Syncope client are called to perform the
authentication?|
|- How does Syncope process the provided username and password? Is there an
explicit call to a method (e.g., login())?|
|- Once authentication is successful, does Syncope return a response containing
a token and/or the user’s roles, thereby allowing us to determine whether a
user has access to certain parts of the website?|
|I would like to understand the complete flow so that I can properly integrate
this process into my authentication module. |
|Any help or references to the relevant documentation would be greatly
appreciated.|
|Thank you in advance for your assistance!|
Hi,
at high level, the SyncopeClientFactoryBean will create a SyncopeClient
instance with the parameters you might have configured for it.
Two types of credentials are supported: username / password and jwt: when
passing the former (as in your sample above), those are internally used to
obtain a jwt value, which is then used for any following operation.
For all the details, just follow the code [1].
HTH
Regards.
[1]
https://github.com/apache/syncope/blob/master/client/idrepo/lib/src/main/java/org/apache/syncope/client/lib/SyncopeClientFactoryBean.java#L265
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/