|
|
|
@ -743,11 +743,11 @@ func unBindWxUser(context *gin.Context) {
|
|
|
|
|
// @Tags 统一认证管理
|
|
|
|
|
// @Accept application/x-www-form-urlencoded
|
|
|
|
|
// @Produce json
|
|
|
|
|
// @Param access_key query string true "access_key"
|
|
|
|
|
// @Param secret_key query string true "secret_key"
|
|
|
|
|
// @Param redirect_uri query string true "redirect_uri"
|
|
|
|
|
// @Param access_key formData string true "access_key"
|
|
|
|
|
// @Param secret_key formData string true "secret_key"
|
|
|
|
|
// @Param redirect_uri formData string true "redirect_uri"
|
|
|
|
|
// @Success 200 {string} string
|
|
|
|
|
// @Router /oauth2/AddClient [get]
|
|
|
|
|
// @Router /oauth2/AddClient [post]
|
|
|
|
|
func AddClient(context *gin.Context) {
|
|
|
|
|
ip := context.ClientIP()
|
|
|
|
|
if ip != "127.0.0.1" {
|
|
|
|
@ -757,9 +757,9 @@ func AddClient(context *gin.Context) {
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
accessKey := context.Query("access_key")
|
|
|
|
|
secretKey := context.Query("secret_key")
|
|
|
|
|
redirectUri := context.Query("redirect_uri")
|
|
|
|
|
accessKey := context.PostForm("access_key")
|
|
|
|
|
secretKey := context.PostForm("secret_key")
|
|
|
|
|
redirectUri := context.PostForm("redirect_uri")
|
|
|
|
|
RedisStorage.OAuth2RedisStorage.CreateClient(
|
|
|
|
|
&osin.DefaultClient{
|
|
|
|
|
Id: accessKey,
|
|
|
|
@ -778,9 +778,9 @@ func AddClient(context *gin.Context) {
|
|
|
|
|
// @Tags 统一认证管理
|
|
|
|
|
// @Accept application/x-www-form-urlencoded
|
|
|
|
|
// @Produce json
|
|
|
|
|
// @Param access_key query string true "access_key"
|
|
|
|
|
// @Param access_key formData string true "access_key"
|
|
|
|
|
// @Success 200 {string} string
|
|
|
|
|
// @Router /oauth2/DelClient [get]
|
|
|
|
|
// @Router /oauth2/DelClient [post]
|
|
|
|
|
func DelClient(context *gin.Context) {
|
|
|
|
|
ip := context.ClientIP()
|
|
|
|
|
if ip != "127.0.0.1" {
|
|
|
|
@ -790,7 +790,7 @@ func DelClient(context *gin.Context) {
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
accessKey := context.Query("access_key")
|
|
|
|
|
accessKey := context.PostForm("access_key")
|
|
|
|
|
RedisStorage.OAuth2RedisStorage.DeleteClient(
|
|
|
|
|
&osin.DefaultClient{
|
|
|
|
|
Id: accessKey,
|
|
|
|
|