mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 12:52:25 -05:00 
			
		
		
		
	Bumps [github.com/SherClockHolmes/webpush-go](https://github.com/SherClockHolmes/webpush-go) from 1.3.0 to 1.4.0. - [Release notes](https://github.com/SherClockHolmes/webpush-go/releases) - [Commits](https://github.com/SherClockHolmes/webpush-go/compare/v1.3.0...v1.4.0) --- updated-dependencies: - dependency-name: github.com/SherClockHolmes/webpush-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
		
			
				
	
	
		
			63 lines
		
	
	
	
		
			2.3 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
	
		
			2.3 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| package jwt
 | |
| 
 | |
| // RegisteredClaims are a structured version of the JWT Claims Set,
 | |
| // restricted to Registered Claim Names, as referenced at
 | |
| // https://datatracker.ietf.org/doc/html/rfc7519#section-4.1
 | |
| //
 | |
| // This type can be used on its own, but then additional private and
 | |
| // public claims embedded in the JWT will not be parsed. The typical use-case
 | |
| // therefore is to embedded this in a user-defined claim type.
 | |
| //
 | |
| // See examples for how to use this with your own claim types.
 | |
| type RegisteredClaims struct {
 | |
| 	// the `iss` (Issuer) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.1
 | |
| 	Issuer string `json:"iss,omitempty"`
 | |
| 
 | |
| 	// the `sub` (Subject) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2
 | |
| 	Subject string `json:"sub,omitempty"`
 | |
| 
 | |
| 	// the `aud` (Audience) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3
 | |
| 	Audience ClaimStrings `json:"aud,omitempty"`
 | |
| 
 | |
| 	// the `exp` (Expiration Time) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4
 | |
| 	ExpiresAt *NumericDate `json:"exp,omitempty"`
 | |
| 
 | |
| 	// the `nbf` (Not Before) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.5
 | |
| 	NotBefore *NumericDate `json:"nbf,omitempty"`
 | |
| 
 | |
| 	// the `iat` (Issued At) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.6
 | |
| 	IssuedAt *NumericDate `json:"iat,omitempty"`
 | |
| 
 | |
| 	// the `jti` (JWT ID) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7
 | |
| 	ID string `json:"jti,omitempty"`
 | |
| }
 | |
| 
 | |
| // GetExpirationTime implements the Claims interface.
 | |
| func (c RegisteredClaims) GetExpirationTime() (*NumericDate, error) {
 | |
| 	return c.ExpiresAt, nil
 | |
| }
 | |
| 
 | |
| // GetNotBefore implements the Claims interface.
 | |
| func (c RegisteredClaims) GetNotBefore() (*NumericDate, error) {
 | |
| 	return c.NotBefore, nil
 | |
| }
 | |
| 
 | |
| // GetIssuedAt implements the Claims interface.
 | |
| func (c RegisteredClaims) GetIssuedAt() (*NumericDate, error) {
 | |
| 	return c.IssuedAt, nil
 | |
| }
 | |
| 
 | |
| // GetAudience implements the Claims interface.
 | |
| func (c RegisteredClaims) GetAudience() (ClaimStrings, error) {
 | |
| 	return c.Audience, nil
 | |
| }
 | |
| 
 | |
| // GetIssuer implements the Claims interface.
 | |
| func (c RegisteredClaims) GetIssuer() (string, error) {
 | |
| 	return c.Issuer, nil
 | |
| }
 | |
| 
 | |
| // GetSubject implements the Claims interface.
 | |
| func (c RegisteredClaims) GetSubject() (string, error) {
 | |
| 	return c.Subject, nil
 | |
| }
 |