saml

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUserNotFound = errors.New("user_not_found")

ErrUserNotFound is returned when the SAML -> GitHub username mapping cannot be found.

Functions

This section is empty.

Types

type Saml

type Saml struct {
	MuteUserNotFoundErr bool // Mutes the `user_not_found` error if the user cannot be discovered.
	// contains filtered or unexported fields
}

func New

func New(client *githubv4.Client, org string, optsFn ...func(*Saml)) *Saml

New instantiates a new GitHub SAML discovery adapter for use with GitHub adapters.

func (*Saml) GetEmailFromUsername

func (s *Saml) GetEmailFromUsername(ctx context.Context, logins []string) ([]string, error)

GetEmailFromUsername takes a list of GitHub usernames, and returns a list of emails.

func (*Saml) GetUsernameFromEmail

func (s *Saml) GetUsernameFromEmail(ctx context.Context, emails []string) ([]string, error)

GetUsernameFromEmail takes a list of email addresses, and returns a list of equivalent GitHub usernames.

Jump to

Keyboard shortcuts

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