Spring Boot: Full authentication is required to access this resource

前端 未结 3 1534
情话喂你
情话喂你 2021-01-04 00:15

I am doing example of Spring Boot Security with wso2is server from this post https://github.com/angel-git/wso2is-springoauth, when I am trying to access resource with access

3条回答
  •  一向
    一向 (楼主)
    2021-01-04 00:39

    Many thanx to Angel Gavalda who helped me to solved problem. I used following commands to generate access token and access resource

    For Generating Access token:-

    curl -k -d 'grant_type=client_credentials&client_id=yourClientId&client_secret=yourClientSecret' https://localhost:9443/oauth2/token

    For Accessing Resource:-

    curl -k -H "Authorization: Bearer $ACCESS_TOKEN" http://localhost:8080/greeting

提交回复
热议问题