使用不同的client_ids更改春季oauth2服务器登录页面

时间:2018-10-18 11:58:31

标签: spring spring-boot oauth-2.0 login-page

我正在使用Spring Boot oauth2构建oauth2服务器。

一些技术细节: 1.春季靴1.5 2. spring-security-oauth2 3.定制的登录页面 4. jdbc客户端数据源

我已经使用身份验证代码授予类型完成了整个过程,请参见以下内容:

# Get code
http://localhost:8088/oauth/authorize?client_id=283ef7bb&client_secret=e02dfe5411169f7e&response_type=code&scope=read&state=dummystate&redirect_uri=http://localhost/test.php

# Get access token
http://localhost:8088/oauth/token?client_id=283ef7bb&client_secret=e02dfe5411169f7e&grant_type=authorization_code&redirect_uri=http://localhost/test.php&code=GvXn10

{"access_token":"b8040ddd-9985-468b-9bc3-caefbb54a079","token_type":"bearer","refresh_token":"a95368d3-0b82-4152-8fde-6c848db7fd2e","expires_in":15551999,"scope":"read"}

# Refresh tokens
http://localhost:8088/oauth/token?client_id=283ef7bb&client_secret=e02dfe5411169f7e&grant_type=refresh_token&refresh_token=a95368d3-0b82-4152-8fde-6c848db7fd2e
{"access_token":"b4217500-4532-400a-8b51-bf70ec6b65ac","token_type":"bearer","refresh_token":"a95368d3-0b82-4152-8fde-6c848db7fd2e","expires_in":15551999,"scope":"read"}

我有一个自定义的登录页面,我的问题是: 在登录页面上,如何根据不同的client_id显示差异信息?

例如我的服务用户想验证Alexa技能和Google家庭操作,以访问他在我服务器上的资源。我想在登录页面上显示亚马逊或Google信息。

0 个答案:

没有答案