generated from broadinstitute/golang-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
ac76150
commit 123f9a8
Showing
38 changed files
with
2,500 additions
and
47 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module github.com/broadinstitute/sherlock/go-shared | ||
|
||
go 1.21 | ||
go 1.22 | ||
|
||
require github.com/google/go-cmp v0.6.0 |
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,11 @@ | ||
drop table signing_keys; | ||
|
||
drop table tokens; | ||
|
||
drop table refresh_tokens; | ||
|
||
drop table auth_request_codes; | ||
|
||
drop table auth_requests; | ||
|
||
drop table clients; |
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,98 @@ | ||
create table clients | ||
( | ||
id text not null | ||
primary key, | ||
client_secret_hash bytea, | ||
client_secret_salt bytea, | ||
client_secret_iterations bigint, | ||
client_redirect_uris text, | ||
client_post_logout_redirect_uris text, | ||
client_application_type text, | ||
client_auth_method text, | ||
client_id_token_lifetime bigint, | ||
client_dev_mode boolean, | ||
client_clock_skew bigint | ||
); | ||
|
||
create table auth_requests | ||
( | ||
id text not null | ||
primary key, | ||
created_at timestamp with time zone, | ||
done_at timestamp with time zone, | ||
client_id text | ||
constraint fk_auth_requests_client | ||
references clients | ||
on update cascade on delete cascade, | ||
nonce text, | ||
redirect_uri text, | ||
response_type text, | ||
response_mode text, | ||
scopes text, | ||
state text, | ||
code_challenge text, | ||
code_challenge_method text, | ||
user_id bigint | ||
constraint fk_auth_requests_user | ||
references users | ||
on update cascade on delete cascade | ||
); | ||
|
||
create table auth_request_codes | ||
( | ||
code text not null | ||
primary key, | ||
created_at timestamp with time zone, | ||
auth_request_id text | ||
constraint fk_auth_request_codes_auth_request | ||
references auth_requests | ||
on update cascade on delete cascade | ||
); | ||
|
||
create table refresh_tokens | ||
( | ||
id text not null | ||
primary key, | ||
created_at timestamp with time zone, | ||
token_hash bytea unique, | ||
client_id text | ||
constraint fk_refresh_tokens_client | ||
references clients | ||
on update cascade on delete cascade, | ||
scopes text, | ||
original_auth_at timestamp with time zone, | ||
user_id bigint | ||
constraint fk_refresh_tokens_user | ||
references users | ||
on update cascade on delete cascade | ||
); | ||
|
||
create table tokens | ||
( | ||
id text not null | ||
primary key, | ||
created_at timestamp with time zone, | ||
refresh_token_id text | ||
constraint fk_tokens_refresh_token | ||
references refresh_tokens | ||
on update cascade on delete cascade, | ||
client_id text | ||
constraint fk_tokens_client | ||
references clients | ||
on update cascade on delete cascade, | ||
scopes text, | ||
expiry timestamp with time zone, | ||
user_id bigint | ||
constraint fk_tokens_user | ||
references users | ||
on update cascade on delete cascade | ||
); | ||
|
||
create table signing_keys | ||
( | ||
id text not null | ||
primary key, | ||
created_at timestamp with time zone, | ||
public_key bytea, | ||
private_key bytea | ||
); |
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.