JAVA CAS 5.X 版本集成OAUTH2.0问题

Mr_XK 发布于 2018/07/28 11:32
阅读 2K+
收藏 2

华为云11月刊推送:DIY微信问答机器人,高性能计算代码的20个技巧!>>>

最近由于公司需要使用JAVA CAS 5.x 版本系统 总是提示

 

不明白自己哪配置错误,如知道请告知,谢谢!

输入链接地址如下:

http://localhost:8080/cas/oauth2.0/authorize?response_type=code&client_id=1100660&redirect_uri=http://www.baidu.com

日志输出如下:

系统配置文件:

系统授权文件内容:

application.properties

##
#CAS OAuth2
#
cas.server.name=http://localhost:8080
cas.server.prefix=http://localhost:8080/cas

cas.authn.oauth.refreshToken.timeToKillInSeconds=2592000
cas.authn.oauth.code.timeToKillInSeconds=30
cas.authn.oauth.code.numberOfUses=1
cas.authn.oauth.accessToken.releaseProtocolAttributes=true
cas.authn.oauth.accessToken.timeToKillInSeconds=7200
cas.authn.oauth.accessToken.maxTimeToLiveInSeconds=28800
cas.authn.oauth.grants.resourceOwner.requireServiceHeader=true
cas.authn.oauth.userProfileViewType=NESTED

OAuth2-10001.json

{
  "@class" : "org.apereo.cas.support.oauth.services.OAuthRegisteredService",
  "clientId": "1100660",
  "clientSecret": "e65fa828bedf4a0392cf1e005921dab6",
  "bypassApprovalPrompt": false,
  "generateRefreshToken": false,
  "serviceId" : "^(http|https)://*",
  "name" : "My OAuth service ",
  "id" : 100,
  "attributeReleasePolicy" : {
    "@class" :"org.apereo.cas.services.ReturnAllAttributeReleasePolicy"
  }
}

 

service-auth-all-500.json

{
  "@class": "org.apereo.cas.services.RegexRegisteredService",
  "serviceId" : "^(http|https)://*",
  "name": "all",
  "id": 1005,
  "description": "allow all service",
  "evaluationOrder": 1005,
  "theme":"apereo",
  "attributeReleasePolicy": {
    "@class": "org.apereo.cas.services.ReturnAllAttributeReleasePolicy"
  }
}

 

 

 

加载中
0
isureker
isureker

没有在cas server配置 service

返回顶部
顶部