attached controller OmniauthController

parent 6a028417
gem 'omniauth-google'
\ No newline at end of file
GEM
specs:
PLATFORMS
ruby
DEPENDENCIES
require 'account_controller'
class RedmineOmniauthController < ApplicationController
def omniauth_google
AccountController.new.send(:open_id_authenticate, params[:openid_url])
end
end
module RedmineOmniauthHelper
end
<% if Setting.openid? %>
<%= link_to image_tag('/plugin_assets/redmine_omniauth_google/images/google_login_icon.jpg'), omniauth_google_path(openid_url: 'google.com') %>
<% end %>
\ No newline at end of file
<h2>RedmineOmniauthController#omniauth_google</h2>
# Plugin's routes
# See: http://guides.rubyonrails.org/routing.html
get 'omniauth_google', to: 'redmine_omniauth#omniauth_google', as: :omniauth_google
\ No newline at end of file
require 'redmine'
require_dependency 'redmine_omniauth_google/hooks/view_account_login_bottom_hook'
require_dependency 'hooks/view_account_login_bottom_hook'
Redmine::Plugin.register :redmine_omniauth_google do
name 'Redmine Omniauth Google plugin'
......
module Hooks
class ViewAccountLoginBottomHook < Redmine::Hook::ViewListener
def view_account_login_bottom context = {}
context[:controller].send(:render_to_string, {
partial: "hooks/view_account_login_bottom",
locals: context
})
end
end
end
\ No newline at end of file
require File.expand_path('../../test_helper', __FILE__)
class RedmineOmniauthControllerTest < ActionController::TestCase
# Replace this with your real tests.
def test_truth
assert true
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment