What do i need to do to authenticate my app?

Hello everyone. Ive app that has this in the config:
security:
oauth2:
resourceserver:
jwt:
public-key-location: classpath:public_key.pem
security:
oauth2:
resourceserver:
jwt:
public-key-location: classpath:public_key.pem
And in the readme this is written:
Get token/Refresh token
curl -d "grant_type=password&username=123&password=123" -X POST 'http://androidTv@localhost:8081/auth/oauth/token'
curl -d "grant_type=refresh_token&refresh_token=...." -X POST 'http://androidTv@localhost:8081/auth/oauth/token'

access_token=$( curl -s -d "grant_type=password&username=123&password=123" -X POST 'http://androidTv@localhost:8081/auth/oauth/token' | jq -r '.access_token')
curl -X GET --header "X-Real-IP: 123.123.123.123" --header "Authorization: Bearer $access_token" 'http://localhost:8082/media/channels'
Get token/Refresh token
curl -d "grant_type=password&username=123&password=123" -X POST 'http://androidTv@localhost:8081/auth/oauth/token'
curl -d "grant_type=refresh_token&refresh_token=...." -X POST 'http://androidTv@localhost:8081/auth/oauth/token'

access_token=$( curl -s -d "grant_type=password&username=123&password=123" -X POST 'http://androidTv@localhost:8081/auth/oauth/token' | jq -r '.access_token')
curl -X GET --header "X-Real-IP: 123.123.123.123" --header "Authorization: Bearer $access_token" 'http://localhost:8082/media/channels'
Can smb explain what to i need to do to?
5 Replies
JavaBot
JavaBot3mo ago
This post has been reserved for your question.
Hey @bambizas19! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
bambizas19
bambizas19OP3mo ago
im on windows, but in my ide im using bash. i run my app, it starts on port 8082, then in the command line i run this: curl -d "grant_type=password&username=123&password=123" -X POST 'http://androidTv@localhost:8081/auth/oauth/token' and i get this; curl: (7) Failed to connect to localhost port 8081 after 2235 ms: Couldn't connect to server
JavaBot
JavaBot3mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Peter Rader
Peter Rader3mo ago
Is your webservice running on port 8081?
JavaBot
JavaBot3mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?