开发者

Cas authentication and database authorizing

I've googled around to get started from stracht in this new thing to me.Is it possible to authenticate user with cas and then give roles from own database? I'm using Spring 3 and Sprin开发者_如何学运维g Security.


you can write your own AuthenticationProvider and load the user data from any source you wish. For example you may wrap the CasAuthenticationProvider and add whatever you need.

have a look at the docs: CAS Authentication documentation there is also a CAS sample in the repository.


At the cas server end you need to provide your own authentication handler.

As far as the roles. at the application end you can write you own class which implements UserDetailsService and configure it in the casAuthenticationProvider

http://static.springsource.org/spring-security/site/docs/3.0.x/apidocs/org/springframework/security/core/userdetails/UserDetailsService.html

In case you need to load all the roles at the cas end have a look at the ldap implementation

http://bowerstudios.com/node/645

You may have to do a similar thru database

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜