Documentation

Overview

Package oauthid implements OAuth client ID whitelist check.

Index

Constants

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 Whitelist

type Whitelist struct {
	stringset.Set
}

Whitelist is OAuth client ID whitelist.

func NewWhitelist

func NewWhitelist(primaryID string, additionalIDs []string) Whitelist

NewWhitelist creates new populated client ID whitelist.

func (Whitelist) IsAllowedOAuthClientID

func (wl Whitelist) IsAllowedOAuthClientID(email, clientID string) bool

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

Source Files