2015-09-10 17:11:41 -04:00
|
|
|
{{template "base/head" .}}
|
|
|
|
<div class="admin new authentication">
|
2017-03-15 18:39:38 -04:00
|
|
|
{{template "admin/navbar" .}}
|
2015-12-07 17:30:52 -05:00
|
|
|
<div class="ui container">
|
2017-03-15 18:39:38 -04: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">
|
|
|
|
{{.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">
|
|
|
|
<input type="hidden" id="auth_type" name="type" value="{{.type}}">
|
|
|
|
<div class="text">{{.CurrentTypeName}}</div>
|
|
|
|
<i class="dropdown icon"></i>
|
|
|
|
<div class="menu">
|
|
|
|
{{range .AuthSources}}
|
|
|
|
<div class="item" data-value="{{.Type}}">{{.Name}}</div>
|
|
|
|
{{end}}
|
2015-12-07 17:30:52 -05:00
|
|
|
</div>
|
2017-03-15 18:39:38 -04: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-10 17:11:41 -04:00
|
|
|
|
2017-03-15 18:39:38 -04:00
|
|
|
<!-- LDAP and DLDAP -->
|
2017-03-17 01:55:04 -04:00
|
|
|
{{ template "admin/auth/source/ldap" . }}
|
2015-09-10 17:11:41 -04:00
|
|
|
|
2017-03-15 18:39:38 -04:00
|
|
|
<!-- SMTP -->
|
2017-03-17 01:55:04 -04:00
|
|
|
{{ template "admin/auth/source/smtp" . }}
|
2015-09-10 17:11:41 -04:00
|
|
|
|
2017-03-15 18:39:38 -04: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}}" />
|
|
|
|
</div>
|
2017-02-22 02:14:37 -05:00
|
|
|
|
2017-03-15 18:39:38 -04:00
|
|
|
<!-- OAuth2 -->
|
2017-03-17 01:55:04 -04:00
|
|
|
{{ template "admin/auth/source/oauth" . }}
|
2015-09-10 17:11:41 -04:00
|
|
|
|
2017-03-15 18:39:38 -04: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>
|
|
|
|
<div class="smtp inline field {{if not (eq .type 3)}}hide{{end}}">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<label><strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong></label>
|
|
|
|
<input name="tls" type="checkbox" {{if .tls}}checked{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="has-tls inline field {{if not .HasTLS}}hide{{end}}">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
|
|
|
<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<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-07 17:30:52 -05:00
|
|
|
</div>
|
2015-09-10 17:11:41 -04:00
|
|
|
|
2017-03-15 18:39:38 -04:00
|
|
|
<div class="field">
|
|
|
|
<button class="ui green button">{{.i18n.Tr "admin.auths.new"}}</button>
|
2015-12-07 17:30:52 -05:00
|
|
|
</div>
|
2017-03-15 18:39:38 -04: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 09:26:53 -04: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>
|
|
|
|
<li>Google+</li>
|
|
|
|
<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>
|
|
|
|
</div>
|
2015-12-07 17:30:52 -05:00
|
|
|
</div>
|
2014-05-02 22:48:14 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-09-10 17:11:41 -04:00
|
|
|
{{template "base/footer" .}}
|