Merge pull request #279 from alecdwm/ldap-auth

Support for LDAP server authentication
This commit is contained in:
Max Wu
2017-01-09 00:49:40 +08:00
committed by GitHub
11 changed files with 191 additions and 6 deletions

View File

@@ -38,7 +38,32 @@
<i class="fa fa-google"></i> <%= __('Sign in via %s', 'Google') %>
</a>
<% } %>
<% if((facebook || twitter || github || gitlab || dropbox || google) && email) { %>
<% if((facebook || twitter || github || gitlab || dropbox || google) && ldap) { %>
<hr>
<% }%>
<% if(ldap) { %>
<h4>Via LDAP</h4>
<form data-toggle="validator" role="form" class="form-horizontal" method="post" enctype="application/x-www-form-urlencoded">
<div class="form-group">
<div class="col-sm-12">
<input type="username" class="form-control" name="username" placeholder="Username" required>
<span class="help-block control-label with-errors" style="display: inline;"></span>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<input type="password" class="form-control" name="password" placeholder="Password" required>
<span class="help-block control-label with_errors" style="display: inline;"></span>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="submit" class="btn btn-primary" formaction="<%- url %>/auth/ldap">Sign in</button>
</div>
</div>
</form>
<% } %>
<% if((facebook || twitter || github || gitlab || dropbox || google || ldap) && email) { %>
<hr>
<% }%>
<% if(email) { %>
@@ -67,4 +92,4 @@
</div>
</div>
</div>
</div>
</div>