[keycloak-user] Not able to set credentials for a user while creating a user through my own Rest API
Stian Thorgersen
sthorger at redhat.com
Fri Oct 21 00:49:18 EDT 2016
We'll never expose user credentials over the rest endpoints. We don't even
know them as they are hashed.
Instead of sending a temporary password you should send the user a reset
password link. That's a special code that let's the user set the password.
On 20 October 2016 at 21:55, abhishek raghav <abhi.raghav007 at gmail.com>
wrote:
> I am able to set the user credentials by calling a different endpoint as
> suggested by you. but still when I am inspecting the returned
> UserRepresentation Object, credentials are coming as null.
>
> I am actually trying to create a email template theme, where I am sending
> the temporary created user password to the user to his registered email. So
> I am able to introduce username like this :
>
> ${msg("executeActionsBodyHtml",link, linkExpiration, realmName,
> user.getUsername())}
>
> But when I am trying to do same for
> credentials, user.getCredentials().get(0).getValue() I am getting a Null
> pointer as credentials were not set in the user.
>
> I know its kind of absurd.
>
> Please suggest. What I am doing wrong.
>
> Cheers
> Abhishek
>
>
>
>
>
>
>
> On Thu, Oct 20, 2016 at 9:11 PM, Marek Posolda <mposolda at redhat.com>
> wrote:
>
> > Yes, but we have separate endpoint for manage (reset) user password and
> > other credentials.
> >
> > See for example admin console and check with some plugin (like FF firebug
> > for example) what REST endpoints are called when you reset password for
> > some user.
> >
> > Marek
> >
> >
> > On 20/10/16 17:02, abhishek raghav wrote:
> >
> >> Hey
> >>
> >> I am writing to create user by calling keycloak rest APIs through my own
> >> REST api's. I am able to set all other properties of a user and create a
> >> user, but when i try assigning the credentials , I get stuck.
> >>
> >> First of all Is it possible to do it externally create such scenario..?
> >>
> >> If yes, how can i do that.
> >>
> >>
> >> Cheers
> >> Abhishek
> >> _______________________________________________
> >> keycloak-user mailing list
> >> keycloak-user at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/keycloak-user
> >>
> >
> >
> >
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
More information about the keycloak-user
mailing list