aboutsummaryrefslogtreecommitdiffstats
path: root/services/auth
diff options
context:
space:
mode:
Diffstat (limited to 'services/auth')
-rw-r--r--services/auth/source/ldap/source.go3
-rw-r--r--services/auth/source/oauth2/source.go3
-rw-r--r--services/auth/source/pam/source.go3
-rw-r--r--services/auth/source/smtp/source.go3
-rw-r--r--services/auth/source/sspi/source.go3
5 files changed, 5 insertions, 10 deletions
diff --git a/services/auth/source/ldap/source.go b/services/auth/source/ldap/source.go
index 3e751f512b..be4a4b2d62 100644
--- a/services/auth/source/ldap/source.go
+++ b/services/auth/source/ldap/source.go
@@ -7,7 +7,6 @@ package ldap
import (
"strings"
- "code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/login"
"code.gitea.io/gitea/modules/json"
"code.gitea.io/gitea/modules/secret"
@@ -62,7 +61,7 @@ type Source struct {
// FromDB fills up a LDAPConfig from serialized format.
func (source *Source) FromDB(bs []byte) error {
- err := models.JSONUnmarshalHandleDoubleEncode(bs, &source)
+ err := json.UnmarshalHandleDoubleEncode(bs, &source)
if err != nil {
return err
}
diff --git a/services/auth/source/oauth2/source.go b/services/auth/source/oauth2/source.go
index 60845e3b0f..bedaed7ef3 100644
--- a/services/auth/source/oauth2/source.go
+++ b/services/auth/source/oauth2/source.go
@@ -5,7 +5,6 @@
package oauth2
import (
- "code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/login"
"code.gitea.io/gitea/modules/json"
)
@@ -33,7 +32,7 @@ type Source struct {
// FromDB fills up an OAuth2Config from serialized format.
func (source *Source) FromDB(bs []byte) error {
- return models.JSONUnmarshalHandleDoubleEncode(bs, &source)
+ return json.UnmarshalHandleDoubleEncode(bs, &source)
}
// ToDB exports an SMTPConfig to a serialized format.
diff --git a/services/auth/source/pam/source.go b/services/auth/source/pam/source.go
index 73850cd9a2..65ae76138c 100644
--- a/services/auth/source/pam/source.go
+++ b/services/auth/source/pam/source.go
@@ -5,7 +5,6 @@
package pam
import (
- "code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/login"
"code.gitea.io/gitea/modules/json"
)
@@ -29,7 +28,7 @@ type Source struct {
// FromDB fills up a PAMConfig from serialized format.
func (source *Source) FromDB(bs []byte) error {
- return models.JSONUnmarshalHandleDoubleEncode(bs, &source)
+ return json.UnmarshalHandleDoubleEncode(bs, &source)
}
// ToDB exports a PAMConfig to a serialized format.
diff --git a/services/auth/source/smtp/source.go b/services/auth/source/smtp/source.go
index 52e2505670..006202e0d5 100644
--- a/services/auth/source/smtp/source.go
+++ b/services/auth/source/smtp/source.go
@@ -5,7 +5,6 @@
package smtp
import (
- "code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/login"
"code.gitea.io/gitea/modules/json"
)
@@ -35,7 +34,7 @@ type Source struct {
// FromDB fills up an SMTPConfig from serialized format.
func (source *Source) FromDB(bs []byte) error {
- return models.JSONUnmarshalHandleDoubleEncode(bs, &source)
+ return json.UnmarshalHandleDoubleEncode(bs, &source)
}
// ToDB exports an SMTPConfig to a serialized format.
diff --git a/services/auth/source/sspi/source.go b/services/auth/source/sspi/source.go
index 68fd6a6079..8d469d481f 100644
--- a/services/auth/source/sspi/source.go
+++ b/services/auth/source/sspi/source.go
@@ -5,7 +5,6 @@
package sspi
import (
- "code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/login"
"code.gitea.io/gitea/modules/json"
)
@@ -28,7 +27,7 @@ type Source struct {
// FromDB fills up an SSPIConfig from serialized format.
func (cfg *Source) FromDB(bs []byte) error {
- return models.JSONUnmarshalHandleDoubleEncode(bs, &cfg)
+ return json.UnmarshalHandleDoubleEncode(bs, &cfg)
}
// ToDB exports an SSPIConfig to a serialized format.