rbCAS / CASino

CASino is a Ruby-based Single Sign-On solution supporting the CAS standard
MIT License
331 stars 189 forks source link

Auto sign in #116

Closed Brianpan closed 9 years ago

Brianpan commented 9 years ago

I'm a newbie in Ruby I try using the issue 40 approach and this is the code

##get tickets from cas server
ticket = RestClient("localhost:4000/api/users/tickets")
##auto sign in 
RestClient.post("localhost:4000/login", {:username => "xxx", :password => "123123123", :lt => ticket, :rememberMe => "1"})

what should i store in cookies[:tgt]? (a login ticket ticket ? ex: CASino::LoginTicket.create.ticket) or any approach to use api to get authorize from cas server?

Thanks!

luxflux commented 9 years ago

The API has been removed in the 4.0 release. Check this documentation to see how to do this with the "Auth Token Login" mechanism.