Merge pull request #3189 from wansir/oidc

support OIDC identity provider
This commit is contained in:
KubeSphere CI Bot
2021-01-21 16:13:40 +08:00
committed by GitHub
82 changed files with 13355 additions and 196 deletions

View File

@@ -171,7 +171,7 @@ func (h *handler) Authorize(req *restful.Request, resp *restful.Response) {
http.Redirect(resp, req.Request, redirectURL, http.StatusFound)
}
func (h *handler) oauthCallBack(req *restful.Request, resp *restful.Response) {
func (h *handler) oauthCallback(req *restful.Request, resp *restful.Response) {
code := req.QueryParameter("code")
provider := req.PathParameter("callback")

View File

@@ -104,7 +104,7 @@ func AddToContainer(c *restful.Container, im im.IdentityManagementInterface,
"otherwise, REQUIRED. The scope of the access token as described by [RFC6479] Section 3.3.").Required(false)).
Param(ws.QueryParameter("state", "if the \"state\" parameter was present in the client authorization request."+
"The exact value received from the client.").Required(true)).
To(handler.oauthCallBack).
To(handler.oauthCallback).
Returns(http.StatusOK, api.StatusOK, oauth.Token{}).
Metadata(restfulspec.KeyOpenAPITags, []string{constants.AuthenticationTag}))