summaryrefslogtreecommitdiffstats
path: root/routers/admin/auths.go
diff options
context:
space:
mode:
authorPaolo Borelli <pborelli@gnome.org>2015-04-23 13:58:57 +0200
committerIgnacio Casal Quinteiro <icq@gnome.org>2015-04-24 10:13:01 +0200
commit182003aa417ba67661c6743e0fabe6e1f67efd1c (patch)
treecff0efe4adedd4bc52b3c852e254a7c4fe0dad99 /routers/admin/auths.go
parent2c4fb6e6469f756dfaeb276302bac87e4dac3e1e (diff)
downloadgitea-182003aa417ba67661c6743e0fabe6e1f67efd1c.tar.gz
gitea-182003aa417ba67661c6743e0fabe6e1f67efd1c.zip
Add PAM authentication
Diffstat (limited to 'routers/admin/auths.go')
-rw-r--r--routers/admin/auths.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/routers/admin/auths.go b/routers/admin/auths.go
index b13b0bd134..2bec7da46c 100644
--- a/routers/admin/auths.go
+++ b/routers/admin/auths.go
@@ -84,6 +84,10 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
Port: form.SMTPPort,
TLS: form.TLS,
}
+ case models.PAM:
+ u = &models.PAMConfig{
+ ServiceName: form.PAMServiceName,
+ }
default:
ctx.Error(400)
return
@@ -166,6 +170,10 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
Port: form.SMTPPort,
TLS: form.TLS,
}
+ case models.PAM:
+ config = &models.PAMConfig{
+ ServiceName: form.PAMServiceName,
+ }
default:
ctx.Error(400)
return