[keycloak-user] Writing new way to login
triton oidc
triton.oidc at gmail.com
Tue May 29 10:17:20 EDT 2018
Hi,
i made some progress,
This implementation was not in the existing keycloak package, therefore i
need to create a jar
i managed to build a jar with the implementation "PassThroughAuthenticator".
It is displayed in the interface.
I selected it for an authentication.
However when i try to authenticate the user, I got a
"Failed authentication:
org.keycloak.authentication.AuthenticationFlowException"
The Class i use is comging is coming from this one :
https://github.com/keycloak/keycloak/blob/a743600b344763ce2e7f70a625f590a8425fc5f3/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/forms/PassThroughAuthenticator.java
The only change are the package name and the logger.
I put a log in the getID() method, i get logs
however the one I put in the
> method authenticate(AuthenticationFlowContext context)
Are never reached.
In the UI, i see a "Invalid username or password."
The display error in the log after the stack trace is :
"error=invalid_user_credentials"
- Is it possible to use this authentication method, or is it just for test
purposes ?
- Or did i missed something and i need another action for the "authenticate"
method to be use ?
Thanks for any help
On Wed, May 23, 2018 at 9:00 AM, triton oidc <triton.oidc at gmail.com> wrote:
> Hi,
>
> in my current scenario, i wish to write a new way for user to login.
> I saw an example that seems pretty simple to start with :
> PassThroughAuthenticator, the user is hardcoded in the class and it
> already implements Authenticator and AuthenticatorFactory
>
> I've been trying to use this example is my keycloak
>
> Looking at the configuration xml, I saw some lines containing spi.
> like mentioned in the doc
> <https://www.keycloak.org/docs/3.3/server_development/topics/providers.html>
>
>
> I guess i need to put the PROVIDER_ID ("testsuite-dummy-passthrough" in
> my example)
> somewhere in the XML, then it will appear in the UI in Authentication /
> flow / execution / Provider
>
> I tried this, but it's not showing in the UI after a restart
> <spi name="dummy-login">
> <default-provider>testsuite-dummy-passthrough</default-
> provider>
> <provider name="default" enabled="true"/>
> </spi>
>
> 1) am i looking in the right direction for filling the XML, or did i miss
> any step
> 2) am i looking in the correct menu in the UI
>
> Thanks for any help
>
> I'll keep trying in the meantime
>
> Amaury
>
More information about the keycloak-user
mailing list