Skip to content

Commit

Permalink
feat(go): generate new claim for token
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelVallenet committed May 17, 2023
1 parent 5f35363 commit b4d1175
Show file tree
Hide file tree
Showing 7 changed files with 322 additions and 155 deletions.
9 changes: 6 additions & 3 deletions api/pwsso.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@ option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;

message ActionToken {
string typ = 1; // Type of token
google.protobuf.Timestamp iat = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = true]; // Times of token validity
google.protobuf.Timestamp exp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = true]; // Times of token validity
string sub = 4; // ID of the user
string iss = 5; // Issuer of the token
string aud = 6; // Audience of the token
string sid = 7; // Session ID
string nonce = 8; // Nonce
}

message Claims {
string preferred_username = 1;
string nickname = 1;
string email = 2;
bool email_verified = 3;
string family_name = 4;
string given_name = 5;

ActionToken action_token = 100;
}
2 changes: 1 addition & 1 deletion docs/gen.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions go/cmd/pathwar/depaware.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ pathwar.land/pathwar/v2/go/cmd/pathwar dependencies: (generated by github.com/ta
crypto/x509/pkix from crypto/x509
database/sql from github.com/go-sql-driver/mysql+
database/sql/driver from database/sql+
embed from crypto/elliptic
embed from crypto/internal/nistec
encoding from encoding/json+
encoding/asn1 from crypto/x509+
encoding/base64 from encoding/json+
Expand All @@ -263,6 +263,7 @@ pathwar.land/pathwar/v2/go/cmd/pathwar dependencies: (generated by github.com/ta
go/build from github.com/getsentry/sentry-go+
go/build/constraint from go/build
go/doc from go/build
go/doc/comment from go/doc
go/parser from github.com/gobuffalo/packr/v2/jam/parser+
go/scanner from go/ast+
go/token from github.com/gobuffalo/packr/v2/jam/parser+
Expand Down Expand Up @@ -293,7 +294,7 @@ pathwar.land/pathwar/v2/go/cmd/pathwar dependencies: (generated by github.com/ta
net/textproto from github.com/grpc-ecosystem/grpc-gateway/runtime+
net/url from crypto/x509+
os from crypto/rand+
os/exec from internal/execabs+
os/exec from go/build+
os/signal from github.com/oklog/run+
os/user from archive/tar+
path from archive/tar+
Expand All @@ -312,7 +313,7 @@ pathwar.land/pathwar/v2/go/cmd/pathwar dependencies: (generated by github.com/ta
syscall from archive/tar+
testing from pathwar.land/pathwar/v2/go/pkg/pwapi+
text/tabwriter from github.com/peterbourgon/ff/v3/ffcli+
text/template from go/doc+
text/template from html/template+
text/template/parse from html/template+
time from archive/tar+
unicode from bytes+
Expand Down
2 changes: 1 addition & 1 deletion go/gen.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b4d1175

Please sign in to comment.