mirror of
https://github.com/wahyd4/Libr.git
synced 2026-08-21 02:36:11 +10:00
21 lines
260 B
Ruby
21 lines
260 B
Ruby
require "douban_auth"
|
|
|
|
class UserController < ApplicationController
|
|
include Douban_Auth
|
|
|
|
def login
|
|
render :layout => false
|
|
end
|
|
|
|
def auth_douban
|
|
url = auth_url.to_s
|
|
redirect_to url
|
|
end
|
|
|
|
def logout
|
|
session[:name] = nil
|
|
redirect_to '/'
|
|
end
|
|
|
|
end
|