mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 14:25:38 -04:00
Initial support for LDAP server authentication
Limitations as of this commit: - tlsOptions can only be specified in config.json, not as env vars - authentication failures are not yet gracefully handled by the UI - instead the error message is shown on a blank page (/auth/ldap) - no email address is associated with the LDAP user's account - no picture/profile URL is associated with the LDAP user's account - we might have to generate our own access + refresh tokens, because we aren't using oauth. The currently generated tokens are just a placeholder. - 'LDAP Sign in' needs to be translated to each locale
This commit is contained in:
parent
8095f8cc98
commit
02e9927714
11 changed files with 135 additions and 7 deletions
35
public/views/signin-ldap-modal.ejs
Normal file
35
public/views/signin-ldap-modal.ejs
Normal file
|
@ -0,0 +1,35 @@
|
|||
<!-- signin ldap modal -->
|
||||
<div class="modal fade signin-ldap-modal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="mySmallModalLabel"><%= __('LDAP Sign in') %></h4>
|
||||
</div>
|
||||
<div class="modal-body" style="text-align: center;">
|
||||
<% if(ldap) { %>
|
||||
<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>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue