directory

package
v0.18.2-0...-57123b4 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupRecordType = "pomerium.io/DirectoryGroup"
	UserRecordType  = "pomerium.io/DirectoryUser"
)

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(provider Provider) http.Handler

NewHandler creates a new Handler.

Types

type Group

type Group struct {
	ID    string `json:"id,omitempty"`
	Name  string `json:"name,omitempty"`
	Email string `json:"email,omitempty"`
}

A Group represents a group in a directory.

type Provider

type Provider interface {
	GetDirectory(context.Context) ([]Group, []User, error)
}

A Provider returns all the groups and users in a directory.

type ProviderFunc

type ProviderFunc func(context.Context) ([]Group, []User, error)

A ProviderFunc implements the Provider interface via a function.

func (ProviderFunc) GetDirectory

func (p ProviderFunc) GetDirectory(ctx context.Context) ([]Group, []User, error)

GetDirectory gets all the groups and users in a directory.

type User

type User struct {
	ID          string   `json:"id,omitempty"`
	GroupIDs    []string `json:"group_ids,omitempty"`
	DisplayName string   `json:"display_name,omitempty"`
	Email       string   `json:"email,omitempty"`
}

A User represents a user in a directory.

Directories

Path Synopsis
mock_auth0
Package mock_auth0 is a generated GoMock package.
Package mock_auth0 is a generated GoMock package.
Package azure contains an azure active directory directory provider.
Package azure contains an azure active directory directory provider.
Package cognito contains a directory implementation for cognito.
Package cognito contains a directory implementation for cognito.
Package github contains a directory provider for github.
Package github contains a directory provider for github.
Package gitlab contains a directory provider for gitlab.
Package gitlab contains a directory provider for gitlab.
Package google contains the Google directory provider.
Package google contains the Google directory provider.
Package okta contains the Okta directory provider.
Package okta contains the Okta directory provider.
Package onelogin contains the onelogin directory provider.
Package onelogin contains the onelogin directory provider.
Package ping implements a directory provider for Ping.
Package ping implements a directory provider for Ping.

Jump to

Keyboard shortcuts

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