8
私はSpring OAuth認証サーバを持っており、複数のクライアント(ID)にサポートを追加したいと思います。私が最初にクライアントとアクセストークンを取得することができます複数のクライアントをSpring OAuth2認証サーバに追加する
clients
.inMemory().withClient(client).secret(clientSecret)
.resourceIds(resourceId)
.authorizedGrantTypes("client_credentials", "password", "refresh_token", "implicit", "authorization_code")
.authorities("ROLE_USER")
.scopes("read", "write")
.autoApprove(true)
.and()
.inMemory().withClient("acme").secret("acmesecret")
.resourceIds(resourceId)
.authorizedGrantTypes("client_credentials", "password", "refresh_token", "implicit", "authorization_code")
.authorities("ROLE_USER_ACME")
.scopes("read", "write")
.autoApprove(true);
が、2番目のクライアントとアクセストークンを取得しようとしたとき、私はこのエラーを取得:私はこのようなクライアントを構成し
{
"timestamp": 1456822249638,
"status": 401,
"error": "Unauthorized",
"message": "Bad credentials",
"path": "/oauth/token"
}
をさらに追加することが可能です1つのクライアントとそれを行う方法? Allso、データベースからクライアントを読み取る方法は?
ではなくapplication.ymlファイルを経由して、これを達成することは可能ですか? –
@AndreasLundgren: '.yml'ファイルで運がまだありませんでしたか? – frhd
いいえ、私たちは実際にはアクセスを必要とする第三者のバックエンドシステムはなく、内部のBEシステムとクライアントだけしか持っていなかったので、oAuth2をスキップしました。 –