puavo_authentication 0.0.19 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  class SessionsController < ApplicationController
2
2
  layout 'sessions'
3
- skip_before_filter :login_required, :only => [:new, :create]
3
+ before_filter :login_required, :only => [:destroy, :show]
4
4
 
5
5
  def new
6
6
  end
@@ -19,13 +19,6 @@ class SessionsController < ApplicationController
19
19
  end
20
20
  end
21
21
 
22
- def auth
23
-
24
- respond_to do |format|
25
- format.json { render :json => true.to_json }
26
- end
27
- end
28
-
29
22
  def show
30
23
  @user = User.find(session[:dn])
31
24
  respond_to do |format|
@@ -7,12 +7,7 @@ module PuavoAuthentication
7
7
  return @current_user
8
8
  else
9
9
  begin
10
- if session[:dn].to_s.match(/ou=People/)
11
- return @current_user = User.find(session[:dn])
12
- else
13
- # If user is ExternalService return nil
14
- logger.info "current_user is ExternalServier user: #{session[:dn]}"
15
- end
10
+ return @current_user = User.find(session[:dn]) # REST/OAuth?
16
11
  rescue
17
12
  logger.info "Session's user not found! User is removed from ldap server."
18
13
  logger.info "session[:dn]: #{session[:dn]}"
@@ -101,13 +96,6 @@ module PuavoAuthentication
101
96
  def set_authorization_user
102
97
  Puavo::Authorization.current_user = current_user if current_user
103
98
  end
104
-
105
- def remove_authorization_user
106
- if Puavo::Authorization.current_user
107
- logger.debug "Remove authorization user: " + Puavo::Authorization.current_user.dn.inspect
108
- end
109
- Puavo::Authorization.current_user = nil
110
- end
111
99
  end
112
100
  end
113
101
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puavo_authentication
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
5
- prerelease: false
4
+ hash: 27
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 19
10
- version: 0.0.19
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jouni Korhonen
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-09-21 00:00:00 +02:00
19
- default_executable:
18
+ date: 2012-05-22 00:00:00 Z
20
19
  dependencies: []
21
20
 
22
21
  description: Authentication solution for Puavo applications
@@ -44,7 +43,6 @@ files:
44
43
  - lib/tasks/puavo_ldap_auth.rake
45
44
  - lib/user_error.rb
46
45
  - rails/init.rb
47
- has_rdoc: true
48
46
  homepage: http://github.com/opinsys/puavo_authentication
49
47
  licenses: []
50
48
 
@@ -74,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
72
  requirements: []
75
73
 
76
74
  rubyforge_project:
77
- rubygems_version: 1.3.7
75
+ rubygems_version: 1.8.24
78
76
  signing_key:
79
77
  specification_version: 3
80
78
  summary: Authentication solution for Puavo applications