summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2015-04-24 16:43:58 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2015-04-24 16:43:58 +0800
commitf92bdf875b4ccb2a8eadaa571d112ebf653986d6 (patch)
tree7bdcb2774039667c0ff01deabd283840cd2aaa74 /routers
parent5de0b0c5cef74e762eb499b6517d0416f2c6bace (diff)
parent182003aa417ba67661c6743e0fabe6e1f67efd1c (diff)
downloadgitea-f92bdf875b4ccb2a8eadaa571d112ebf653986d6.tar.gz
gitea-f92bdf875b4ccb2a8eadaa571d112ebf653986d6.zip
Merge pull request #1226 from nice-software/wip/pam
Add PAM authentication
Diffstat (limited to 'routers')
-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