-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
350 additions
and
68 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
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
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,10 @@ | ||
{{> head }} | ||
|
||
{{> top_nav }} | ||
|
||
<form action="/create-oauth" method="POST"> | ||
<p>Name: <input type="text" id="name" name="name"></p> | ||
<p><input type="submit" value="Create OAuth2 Token"></p> | ||
</form> | ||
|
||
{{> foot }} |
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,19 @@ | ||
{{> head }} | ||
|
||
{{> top_nav }} | ||
|
||
<p>Copy token into your application. <strong>Token will not be shown again</strong>.</p> | ||
|
||
<ul> | ||
<li>Name: {{{token_name}}}</li> | ||
<li>Expires: {{token_expires}}</li> | ||
<li>Token: <input | ||
id="token" | ||
name="token" | ||
value="{{token}}" | ||
readonly="1" | ||
type="text" | ||
></li> | ||
</ul> | ||
|
||
{{> foot }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,8 @@ | ||
ALTER TABLE members ADD COLUMN password_type TEXT; | ||
ALTER TABLE members ADD COLUMN encoded_password TEXT; | ||
ALTER TABLE members ADD COLUMN username TEXT UNIQUE; | ||
|
||
|
||
CREATE TABLE roles ( | ||
CREATE TABLE oauth_tokens ( | ||
id SERIAL PRIMARY KEY NOT NULL, | ||
name TEXT NOT NULL UNIQUE | ||
name TEXT NOT NULL, | ||
token TEXT NOT NULL UNIQUE, | ||
expiration_date TIMESTAMP WITH TIME ZONE NOT NULL, | ||
member_id INT NOT NULL REFERENCES members (id) | ||
); | ||
|
||
CREATE TABLE role_members ( | ||
member_id INT REFERENCES members (id), | ||
role_id INT REFERENCES roles (id), | ||
|
||
PRIMARY KEY( member_id, role_id ) | ||
); | ||
CREATE INDEX ON role_members (member_id); | ||
CREATE INDEX ON role_members (role_id); | ||
|
||
CREATE TABLE permissions ( | ||
id SERIAL PRIMARY KEY NOT NULL, | ||
name TEXT NOT NULL UNIQUE | ||
); | ||
|
||
CREATE TABLE role_permissions ( | ||
role_id INT REFERENCES roles (id), | ||
permission_id INT REFERENCES permissions(id), | ||
|
||
PRIMARY KEY( role_id, permission_id ) | ||
); | ||
CREATE INDEX ON role_permissions (role_id); | ||
CREATE INDEX ON role_permissions (permission_id); | ||
CREATE INDEX ON oauth_tokens (member_id); |
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
Oops, something went wrong.