GithubHelp home page GithubHelp logo

wensincai / cas-oauth-server Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 360 KB

在cas-overlay基础上, 根据文档配置的支持oauth 2.0协议的服务端。

License: Apache License 2.0

Java 95.31% CSS 1.65% JavaScript 3.04%

cas-oauth-server's Introduction

在cas-overlay基础上, 根据文档配置的支持oauth 2.0协议的服务端。 cas文档:http://jasig.github.io/cas/4.0.x/index.html cas构建基础:https://github.com/lansheng228/cas-overlay 构建命令:mvn clean package 将生成的war包,放到/var/lib/tomcat7/webapps/下, 重启tomcat。 访问https://localhost:8443/cas即可。

目前oauth_consumer_key和oauth_consumer_secret硬编码在配置文件中,项目启动时载入到内存中。 实际项目中,需要从数据库或json文件中读取。 APP ID:477037 API KEY:9ad1c51571f9479d8f5df19e5f63f07c Secret Key:2bf4a68d6d0147feadb9fbeaf582b561

可以在浏览器输入如下URL测试该服务端是否正常。 https://localhost:8443/cas/oauth2.0/authorize?client_id=9ad1c51571f9479d8f5df19e5f63f07c&redirect_uri=http://www.syberos.com/&response_type=code 此处client_id即为上述的API KEY。该url执行完毕,将返回ST。

https://localhost:8443/cas/oauth2.0/accessToken?client_id=9ad1c51571f9479d8f5df19e5f63f07c&client_secret=2bf4a68d6d0147feadb9fbeaf582b561&redirect_uri=http://www.syberos.com/&code=ST-1-RbxAfWfqjrhcsbe0e017-casauth 此处client_id即为上述的API KEY;client_secret即为上述的Secret Key;code即为上面生成的ST。根据实际生成值修改。该url执行完毕,将返回TGT。

https://localhost:8443/cas/oauth2.0/profile?access_token=TGT-1-pRLlFefgqIhtDvMl6L162LRsqlxylv3ogwTwcH6DRp4LYcadE2-cas01.example.org 此处access_token即为上述的TGT。

后端使用ldap存储用户信息。修改cas.properties相应的字段,正确配置ldap信息。

cas-oauth-server's People

Contributors

simbahebinbo avatar

Watchers

wensincai avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.