Add OpenID to CodiMD

With OpenID every OpenID capable provider can provide authentication for
users of a CodiMD instance. This means we have federated
authentication.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
Sheogorath 2017-08-31 23:33:55 +02:00
parent 32af96aa37
commit 9f9c4089be
No known key found for this signature in database
GPG key ID: 1F05CC3635CDDFFD
8 changed files with 91 additions and 4 deletions

View file

@ -78,7 +78,26 @@
</div>
</form>
<% } %>
<% if((facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap || oauth2) && email) { %>
<% if((facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap || oauth2) && openID) { %>
<hr>
<% }%>
<% if(openID) { %>
<h4>OpenID</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="text" class="form-control" name="openid_identifier" placeholder="OpenID" 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/openid">Sign in</button>
</div>
</div>
</form>
<% } %>
<% if((facebook || twitter || github || gitlab || mattermost || dropbox || google || ldap || oauth2 || openID) && email) { %>
<hr>
<% }%>
<% if(email) { %>