-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from plone/authentication
Authentication
- Loading branch information
Showing
22 changed files
with
912 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
POST /plone/@login | ||
Accept: application/json | ||
|
||
HTTP 200 OK | ||
content-type: application/json | ||
|
||
{ | ||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmdWxsbmFtZSI6IiIsInN1YiI6ImFkbWluIn0.SZDnl_baH5M_StJJrzfbj7o-5My30NmSFbMrhpSX5I4" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
POST /plone/@login-renew | ||
Accept: application/json | ||
|
||
HTTP 200 OK | ||
content-type: application/json | ||
|
||
{ | ||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmdWxsbmFtZSI6IiIsInN1YiI6ImFkbWluIn0.SZDnl_baH5M_StJJrzfbj7o-5My30NmSFbMrhpSX5I4" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
POST /plone/@logout | ||
Accept: application/json | ||
|
||
HTTP 204 No Content | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<html xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:tal="http://xml.zope.org/namespaces/tal"> | ||
<body> | ||
<h1 tal:replace="structure here/manage_page_header">Header</h1> | ||
|
||
<h2 tal:define="form_title string:JWT Authentication Plugin" | ||
tal:replace="structure here/manage_form_title">Form Title</h2> | ||
|
||
<p class="form-help"> | ||
Plone PAS plugin for authentication with JSON web tokens (JWT) | ||
</p> | ||
|
||
<form action="addJWTAuthenticationPlugin" method="post"> | ||
<table> | ||
<tr> | ||
<td class="form-label">Id</td> | ||
<td><input type="text" name="id_" tal:attributes="value request/id|string:jwt_auth"/></td> | ||
</tr> | ||
<tr> | ||
<td class="form-label">Title</td> | ||
<td><input type="text" name="title"/></td> | ||
</tr> | ||
<tr> | ||
<td colspan="2"> | ||
<div class="form-element"> | ||
<input type="submit" value="Add"/> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
</form> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<h1 tal:replace="structure here/manage_page_header"> PAGE HEADER </h1> | ||
<h2 tal:replace="structure here/manage_tabs"> PAGE HEADER </h2> | ||
|
||
<h3>JWT Authentication</h3> | ||
|
||
<p class="form-help"> | ||
Plone PAS plugin for authentication with JSON web tokens (JWT). | ||
</p> | ||
|
||
<form action="manage_updateConfig" method="post"> | ||
<table> | ||
<tr valign="top"> | ||
<td><div class="form-label">Token Validity Timeout (in seconds)</div> | ||
<div class="form-help">After this, the token is invalid and the user | ||
must login again. Set to 0 for the token to remain valid indefinitely.</div> | ||
</td> | ||
<td><input type="text" name="token_timeout" | ||
tal:attributes="value context/token_timeout|nothing"/></td> | ||
</tr> | ||
<tr> | ||
<td align="left" valign="top"> | ||
<input type="checkbox" name="use_keyring" id="use-keyring" | ||
tal:attributes="checked python: context.use_keyring and 'checked'"/> <label class="form-label" for="use-keyring">Use Keyring</label> | ||
<div class="form-help">If enabled, tokens are signed with a secret from | ||
Plone's keyring. If you want tokens that remain valid indefinitely you should disable this.</div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td align="left" valign="top"> | ||
<input type="checkbox" name="store_tokens" id="store-tokens" | ||
tal:attributes="checked python: context.store_tokens and 'checked'"/> <label class="form-label" for="store-tokens">Store tokens</label> | ||
<div class="form-help">By default tokens are not stored on the server and | ||
thus can't be invalidated. If enabled, tokens that don't expire can be invalidated.</div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td colspan="2"> | ||
<div class="form-element"> | ||
<input type="submit" value="Update"/> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
</form> | ||
|
||
|
||
<h1 tal:replace="structure here/manage_page_footer"> PAGE FOOTER </h1> |
Oops, something went wrong.