Skip to content

Commit

Permalink
wip auth gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
mose committed Jan 5, 2016
1 parent 19053c7 commit 4599eb8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def check_authorization

when 'gitlab'

set :oauth, Hieraviz::AuthGitlab.new(settings.configdata['oauth2_auth'], session)
set :oauth, Hieraviz::AuthGitlab.new(settings.configdata['gitlab_auth'], session)

get '/login' do
redirect settings.oauth.login_url
Expand Down
1 change: 1 addition & 0 deletions lib/hieraviz.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "hieraviz/version"
require "hieraviz/store"
require "hieraviz/auth_gitlab"

module Hieraviz
# Your code goes here...
Expand Down
6 changes: 3 additions & 3 deletions lib/hieraviz/auth_gitlab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ class AuthGitlab

def initialize(settings, session)
@@client ||= OAuth2::Client.new(
settings.configdata['oauth2_auth']['application_id'],
settings.configdata['oauth2_auth']['secret'],
:site => settings.configdata['oauth2_auth']['host']
settings['application_id'],
settings['secret'],
:site => settings['host']
)
@session = session
end
Expand Down

0 comments on commit 4599eb8

Please sign in to comment.