feature/dwn sw js (#1103)

- **feat(macaroon): add  and  to macaroon genesis**
- **refactor: move schema definitions to dedicated file**
- **feat: remove Session model**
- **refactor: move session middleware to internal package**
This commit is contained in:
Prad Nukala
2024-10-02 01:40:49 -04:00
committed by GitHub
parent d62fb30eb8
commit edb109b542
55 changed files with 2472 additions and 543 deletions
+6 -5
View File
@@ -32,16 +32,16 @@ message Params {
message Methods {
option (amino.name) = "macaroon/methods";
option (gogoproto.equal) = true;
repeated string methods = 1;
string default = 1;
repeated string supported = 2;
}
// Scopes defines the set of scopes
message Scopes {
option (amino.name) = "macaroon/scopes";
option (gogoproto.equal) = true;
repeated string scopes = 1;
string base = 1;
repeated string supported = 2;
}
// Caveats defines the available caveats
@@ -49,5 +49,6 @@ message Caveats {
option (amino.name) = "macaroon/caveat";
option (gogoproto.equal) = true;
repeated string caveats = 1;
repeated string supported_first_party = 1;
repeated string supported_third_party = 2;
}
+22
View File
@@ -27,3 +27,25 @@ message Grant {
string origin = 4;
int64 expiry_height = 5;
}
message Macaroon {
option (cosmos.orm.v1.table) = {
id: 1
primary_key: {
fields: "id"
auto_increment: true
}
index: {
id: 1
fields: "subject,origin"
unique: true
}
};
uint64 id = 1;
string controller = 2;
string subject = 3;
string origin = 4;
int64 expiry_height = 5;
string macaroon = 6;
}