mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
fixed ci4s oauth2接入
This commit is contained in:
@@ -2,6 +2,10 @@ class Oauth::Ci4sController < Oauth::BaseController
|
||||
include RegisterHelper
|
||||
|
||||
|
||||
def oauth_url
|
||||
Ci4s::Service.oauth_url(code)
|
||||
end
|
||||
|
||||
# 需要educoder那边设置回调地址
|
||||
def create
|
||||
begin
|
||||
|
||||
@@ -23,6 +23,9 @@ module Ci4s::Service
|
||||
config.dig("oauth", "ci4s", "redirect_uri")
|
||||
end
|
||||
|
||||
def oauth_url
|
||||
"#{base_url}/oauth/authorize?client_id=#{client_id}&redirect_uri=#{URI.encode_www_form_component(redirect_uri)}&response_type=code&grant_type=authorization_code"
|
||||
end
|
||||
|
||||
def request(method, url, params)
|
||||
begin
|
||||
|
||||
Reference in New Issue
Block a user