auth

package
v0.0.0-...-933ea9e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleOAuth2Provider

type GoogleOAuth2Provider struct {
	ClientID string
}

Google Implementation

func (*GoogleOAuth2Provider) ValidateToken

func (o *GoogleOAuth2Provider) ValidateToken(token string) (*Payload, error)

type OAuth2Provider

type OAuth2Provider interface {
	ValidateToken(token string) (*Payload, error)
}

Interface

func NewGoogleOAuth2Provider

func NewGoogleOAuth2Provider(clientID string) OAuth2Provider

type Payload

type Payload struct {
	Issuer   string                 `json:"iss"`
	Audience string                 `json:"aud"`
	Expires  int64                  `json:"exp"`
	IssuedAt int64                  `json:"iat"`
	Subject  string                 `json:"sub,omitempty"`
	Claims   map[string]interface{} `json:"-"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL