2015-09-11 05:11:41 +08:00
|
|
|
{{template "base/head" .}}
|
2020-12-01 12:00:14 +08:00
|
|
|
<div class="page-content admin new authentication">
|
2017-03-16 06:39:38 +08:00
|
|
|
{{template "admin/navbar" .}}
|
2015-12-08 06:30:52 +08:00
|
|
|
<div class="ui container">
|
2017-03-16 06:39:38 +08:00
|
|
|
{{template "base/alert" .}}
|
|
|
|
<h4 class="ui top attached header">
|
|
|
|
{{.i18n.Tr "admin.auths.new"}}
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
2021-10-19 06:08:41 +08:00
|
|
|
{{template "base/disable_form_autofill"}}
|
2017-03-16 06:39:38 +08:00
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<!-- Types and name -->
|
|
|
|
<div class="inline required field {{if .Err_Type}}error{{end}}">
|
|
|
|
<label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
|
|
|
|
<div class="ui selection type dropdown">
|
2022-03-11 06:40:43 +08:00
|
|
|
<input type="hidden" id="auth_type" name="type" value="{{.type}}">
|
2017-03-16 06:39:38 +08:00
|
|
|
<div class="text">{{.CurrentTypeName}}</div>
|
2020-11-01 06:15:11 +08:00
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
2017-03-16 06:39:38 +08:00
|
|
|
<div class="menu">
|
|
|
|
{{range .AuthSources}}
|
2021-07-25 15:09:52 +08:00
|
|
|
<div class="item" data-value="{{.Type.Int}}">{{.Name}}</div>
|
2017-03-16 06:39:38 +08:00
|
|
|
{{end}}
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
2017-03-16 06:39:38 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="required inline field {{if .Err_Name}}error{{end}}">
|
|
|
|
<label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
|
|
|
|
<input id="name" name="name" value="{{.name}}" autofocus required>
|
|
|
|
</div>
|
2015-09-11 05:11:41 +08:00
|
|
|
|
2017-03-16 06:39:38 +08:00
|
|
|
<!-- LDAP and DLDAP -->
|
2017-03-17 13:55:04 +08:00
|
|
|
{{ template "admin/auth/source/ldap" . }}
|
2015-09-11 05:11:41 +08:00
|
|
|
|
2017-03-16 06:39:38 +08:00
|
|
|
<!-- SMTP -->
|
2017-03-17 13:55:04 +08:00
|
|
|
{{ template "admin/auth/source/smtp" . }}
|
2015-09-11 05:11:41 +08:00
|
|
|
|
2017-03-16 06:39:38 +08:00
|
|
|
<!-- PAM -->
|
|
|
|
<div class="pam required field {{if not (eq .type 4)}}hide{{end}}">
|
|
|
|
<label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
|
|
|
|
<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}" />
|
2021-05-14 06:11:47 +08:00
|
|
|
<label for="pam_email_domain">{{.i18n.Tr "admin.auths.pam_email_domain"}}</label>
|
|
|
|
<input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}">
|
2017-03-16 06:39:38 +08:00
|
|
|
</div>
|
2021-09-27 09:02:01 +08:00
|
|
|
<div class="pam optional field {{if not (eq .type 4)}}hide{{end}}">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<label for="skip_local_two_fa"><strong>{{.i18n.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
|
|
|
|
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
|
|
|
|
<p class="help">{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-02-22 15:14:37 +08:00
|
|
|
|
2017-03-16 06:39:38 +08:00
|
|
|
<!-- OAuth2 -->
|
2017-03-17 13:55:04 +08:00
|
|
|
{{ template "admin/auth/source/oauth" . }}
|
2015-09-11 05:11:41 +08:00
|
|
|
|
2019-11-23 07:33:31 +08:00
|
|
|
<!-- SSPI -->
|
|
|
|
{{ template "admin/auth/source/sspi" . }}
|
|
|
|
|
2017-03-16 06:39:38 +08:00
|
|
|
<div class="ldap field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<label><strong>{{.i18n.Tr "admin.auths.attributes_in_bind"}}</strong></label>
|
|
|
|
<input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-05-10 21:10:18 +08:00
|
|
|
<div class="ldap inline field {{if not (eq .type 2)}}hide{{end}}">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<label><strong>{{.i18n.Tr "admin.auths.syncenabled"}}</strong></label>
|
|
|
|
<input name="is_sync_enabled" type="checkbox" {{if .is_sync_enabled}}checked{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-16 06:39:38 +08:00
|
|
|
<div class="inline field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<label><strong>{{.i18n.Tr "admin.auths.activated"}}</strong></label>
|
|
|
|
<input name="is_active" type="checkbox" {{if .is_active}}checked{{end}}>
|
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
2015-09-11 05:11:41 +08:00
|
|
|
|
2017-03-16 06:39:38 +08:00
|
|
|
<div class="field">
|
|
|
|
<button class="ui green button">{{.i18n.Tr "admin.auths.new"}}</button>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
2017-03-16 06:39:38 +08:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h4 class="ui top attached header">
|
|
|
|
{{.i18n.Tr "admin.auths.tips"}}
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<h5>GMail Settings:</h5>
|
|
|
|
<p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p>
|
2017-05-01 21:26:53 +08:00
|
|
|
|
|
|
|
<h5>{{.i18n.Tr "admin.auths.tips.oauth2.general"}}:</h5>
|
|
|
|
<p>{{.i18n.Tr "admin.auths.tips.oauth2.general.tip"}}</p>
|
|
|
|
|
|
|
|
<h5 class="ui top attached header">{{.i18n.Tr "admin.auths.tip.oauth2_provider"}}</h5>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<li>Bitbucket</li>
|
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.bitbucket"}}</span>
|
|
|
|
<li>Dropbox</li>
|
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.dropbox"}}</span>
|
|
|
|
<li>Facebook</li>
|
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.facebook"}}</span>
|
|
|
|
<li>GitHub</li>
|
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.github"}}</span>
|
|
|
|
<li>GitLab</li>
|
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.gitlab"}}</span>
|
2019-09-14 18:02:39 +08:00
|
|
|
<li>Google</li>
|
2017-05-01 21:26:53 +08:00
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.google_plus"}}</span>
|
|
|
|
<li>OpenID Connect</li>
|
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.openid_connect"}}</span>
|
|
|
|
<li>Twitter</li>
|
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.twitter"}}</span>
|
2019-01-14 03:06:22 +08:00
|
|
|
<li>Discord</li>
|
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.discord"}}</span>
|
2019-09-13 10:15:36 +08:00
|
|
|
<li>Gitea</li>
|
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.gitea"}}</span>
|
2020-03-03 11:11:45 +08:00
|
|
|
<li>Nextcloud</li>
|
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.nextcloud"}}</span>
|
2020-03-05 06:08:52 +08:00
|
|
|
<li>Yandex</li>
|
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.yandex"}}</span>
|
2021-04-11 11:46:37 +08:00
|
|
|
<li>Mastodon</li>
|
|
|
|
<span>{{.i18n.Tr "admin.auths.tip.mastodon"}}</span>
|
2017-05-01 21:26:53 +08:00
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
2014-05-03 10:48:14 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-09-11 05:11:41 +08:00
|
|
|
{{template "base/footer" .}}
|