diff options
author | Rutger Broekhoff | 2024-01-02 18:56:31 +0100 |
---|---|---|
committer | Rutger Broekhoff | 2024-01-02 18:56:31 +0100 |
commit | 8db41da676ac8368ef7c2549d56239a5ff5eedde (patch) | |
tree | 09c427fd66de2ec1ebffc8342f5fdbb84b0701b5 /vendor/github.com/golang-jwt/jwt/v5/registered_claims.go | |
parent | d4f75fb6db22e57577867445a022227e70958931 (diff) | |
download | gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.tar.gz gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.zip |
Delete vendor directory
Diffstat (limited to 'vendor/github.com/golang-jwt/jwt/v5/registered_claims.go')
-rw-r--r-- | vendor/github.com/golang-jwt/jwt/v5/registered_claims.go | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/vendor/github.com/golang-jwt/jwt/v5/registered_claims.go b/vendor/github.com/golang-jwt/jwt/v5/registered_claims.go deleted file mode 100644 index 77951a5..0000000 --- a/vendor/github.com/golang-jwt/jwt/v5/registered_claims.go +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | package jwt | ||
2 | |||
3 | // RegisteredClaims are a structured version of the JWT Claims Set, | ||
4 | // restricted to Registered Claim Names, as referenced at | ||
5 | // https://datatracker.ietf.org/doc/html/rfc7519#section-4.1 | ||
6 | // | ||
7 | // This type can be used on its own, but then additional private and | ||
8 | // public claims embedded in the JWT will not be parsed. The typical use-case | ||
9 | // therefore is to embedded this in a user-defined claim type. | ||
10 | // | ||
11 | // See examples for how to use this with your own claim types. | ||
12 | type RegisteredClaims struct { | ||
13 | // the `iss` (Issuer) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.1 | ||
14 | Issuer string `json:"iss,omitempty"` | ||
15 | |||
16 | // the `sub` (Subject) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2 | ||
17 | Subject string `json:"sub,omitempty"` | ||
18 | |||
19 | // the `aud` (Audience) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3 | ||
20 | Audience ClaimStrings `json:"aud,omitempty"` | ||
21 | |||
22 | // the `exp` (Expiration Time) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4 | ||
23 | ExpiresAt *NumericDate `json:"exp,omitempty"` | ||
24 | |||
25 | // the `nbf` (Not Before) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.5 | ||
26 | NotBefore *NumericDate `json:"nbf,omitempty"` | ||
27 | |||
28 | // the `iat` (Issued At) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.6 | ||
29 | IssuedAt *NumericDate `json:"iat,omitempty"` | ||
30 | |||
31 | // the `jti` (JWT ID) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7 | ||
32 | ID string `json:"jti,omitempty"` | ||
33 | } | ||
34 | |||
35 | // GetExpirationTime implements the Claims interface. | ||
36 | func (c RegisteredClaims) GetExpirationTime() (*NumericDate, error) { | ||
37 | return c.ExpiresAt, nil | ||
38 | } | ||
39 | |||
40 | // GetNotBefore implements the Claims interface. | ||
41 | func (c RegisteredClaims) GetNotBefore() (*NumericDate, error) { | ||
42 | return c.NotBefore, nil | ||
43 | } | ||
44 | |||
45 | // GetIssuedAt implements the Claims interface. | ||
46 | func (c RegisteredClaims) GetIssuedAt() (*NumericDate, error) { | ||
47 | return c.IssuedAt, nil | ||
48 | } | ||
49 | |||
50 | // GetAudience implements the Claims interface. | ||
51 | func (c RegisteredClaims) GetAudience() (ClaimStrings, error) { | ||
52 | return c.Audience, nil | ||
53 | } | ||
54 | |||
55 | // GetIssuer implements the Claims interface. | ||
56 | func (c RegisteredClaims) GetIssuer() (string, error) { | ||
57 | return c.Issuer, nil | ||
58 | } | ||
59 | |||
60 | // GetSubject implements the Claims interface. | ||
61 | func (c RegisteredClaims) GetSubject() (string, error) { | ||
62 | return c.Subject, nil | ||
63 | } | ||