Guest User

Untitled

a guest
Jan 23rd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1.  
  2.  
  3.  
  4. def warden.authenticate!
  5. 1) find user by token
  6. 2) token is perished
  7. 3) authlogic session is created
  8. 4) user is activated
  9. end
  10.  
  11.  
  12. def login_by_token
  13. warden.authenticate!(:scope => :cas, :action => 'unauthenticated')
  14.  
  15. tgt = TicketGrantingTicket.new(username)
  16. tgt.save!(settings.redis)
  17. cookie = tgt.to_cookie(request.host)
  18. response.set_cookie(*cookie)
  19. end
Add Comment
Please, Sign In to add comment