Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving empty token #5

Open
mharini opened this issue Sep 14, 2018 · 3 comments
Open

Receiving empty token #5

mharini opened this issue Sep 14, 2018 · 3 comments

Comments

@mharini
Copy link

mharini commented Sep 14, 2018

Hi,

I downloaded the code and ran the application.
I could successfully run the "authorization_server" and create/modify client details. I can also see the changes in my db.
After that, I ran "resource_server" and used the CURL command from ./client.sh file.

In the terminal, I am receiving this:

Got token for curl client as :
{"error":"invalid_token","error_description":"Invalid access token: "}

In the Eclipse console, I am getting this warning:
o.s.s.c.bcrypt.BCryptPasswordEncoder : Encoded password does not look like BCrypt

Can you help me with this?

@yijiulove
Copy link

yijiulove commented Oct 31, 2018

Hi, @mharini
seem the password mentioned is not correct.

You can use Utils.passwordEncoder(String password) method to encrypt one, find it in repository source code - Utils.java

String encryptPassword = Utils.passwordEncoder("password");
System.out.println(encryptPassword);
//the output will be:
//$2a$10$TXYbtrgn5/6hO9xpd/bkPuUJ9abOxXzWrbRzlse0djMUO51vJ2h1i

copy the output value and replace the one in data.sql.

Check Updated Repository <- This repository is referring to current one , some code fix and more detailed explain based on this one.

@shiZK
Copy link

shiZK commented Apr 1, 2019

Hi,Does your demo supports the oauth2 passowrd model ?

@RoHanh96
Copy link

@Akourtiim @chendu when i run code after appoving in my client it shows error:
Access token provider returned a null access token, which is illegal according to the contract.
Can you help me fix this. Thank you very much. Here is my source code in client:
https://github.com/RoHanh96/Oauth2_SSO/tree/master/spring-security-client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants