0
私はouath2モジュールを持っています。サーバーはポート9999で稼働しています。私が "localhost:9999/oauth/token"を要求するとトークンを取得します。 しかし、認証サーバーとRESTエンドポイントが同じプロジェクト(異なるモジュールですが、お互いを知っています)であっても、コントローラはトークンを保持しているかどうか気にしないようです。スプリングブートoauth2トークン
さて、ここで興味深いものが来る:
私はapplication.ymlにこのコードを追加した場合、コントローラは、すべての認証を気にしないでください。
{
"timestamp": 1472114046044,
"status": 401,
"error": "Unauthorized",
"message": "Full authentication is required to access this resource",
"path": "/gamification/api/ebubo"
}
任意のアイデア:私はそれを削除し、コントローラを要求しようとすると、
security:
basic:
enabled: false
oauth2:
client:
client-id: acme
client-secret: acmesecret
access-token-uri: http://localhost:9999/oauth/token
user-authorization-uri: http://localhost:9999/oauth/authorize
resource:
user-info-uri: http://localhost:9999/user
token-info-uri: http://localhost:9999/oauth/check_token
auth:
server:
url: http://localhost:9999/oauth/check_token/
clientId: acme
clientSecret: acmesecret
oauth2:
resource:
userInfoUri: http://localhost:9999/user
しかし、私はこれを取得しますか?誰でも?