You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
788 B
Go

package auth
import (
"net/http"
"git.noahlan.cn/noahlan/ntool-biz/zero/statusz"
"git.noahlan.cn/n-admin/n-admin-server/api/internal/logic/auth"
"git.noahlan.cn/n-admin/n-admin-server/api/internal/svc"
)
// swagger:route get /api/auth/oauth/login/callback auth OauthCallback
//
// Oauth log in callback route | Oauth 登录返回调接口即redirect_uri
//
// Oauth log in callback route | Oauth 登录返回调接口即redirect_uri
//
// Responses:
// 200: LoginResp
func OauthCallbackHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
const transErr = true
l := auth.NewOauthCallbackLogic(r, r.Context(), svcCtx)
resp, err := l.OauthCallback()
statusz.ResponseHandler(r, w, transErr, resp, err)
}
}