oauthid

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package oauthid implements OAuth client ID allowlist check.

Index

Constants

View Source
const GoogleAPIExplorerClientID = "292824132082.apps.googleusercontent.com"

Well-known OAuth client_id of https://apis-explorer.appspot.com/.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allowlist

type Allowlist struct {
	stringset.Set
}

Allowlist is OAuth client ID allowlist.

func NewAllowlist

func NewAllowlist(primaryID string, additionalIDs []string) Allowlist

NewAllowlist creates new populated client ID allowlist.

func (Allowlist) IsAllowedOAuthClientID

func (l Allowlist) IsAllowedOAuthClientID(email, clientID string) bool

IsAllowedOAuthClientID returns true if the given OAuth2 client ID can be used to authorize access from the given email.

Jump to

Keyboard shortcuts

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