providers

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AAPClientInterface

type AAPClientInterface interface {
	GetOrganization(ctx context.Context, token string, organizationID string) (*aap.AAPOrganization, error)
	ListUserTeams(ctx context.Context, token string, userID string) ([]*aap.AAPTeam, error)
	ListOrganizations(ctx context.Context, token string) ([]*aap.AAPOrganization, error)
	ListUserOrganizations(ctx context.Context, token string, userID string) ([]*aap.AAPOrganization, error)
}

type AAPProvider

type AAPProvider struct {
	// contains filtered or unexported fields
}

func NewAAPProvider

func NewAAPProvider(apiUrl string, tlsConfig *tls.Config, cache cache.Membership) (*AAPProvider, error)

func (*AAPProvider) GetUserOrganizations

func (p *AAPProvider) GetUserOrganizations(ctx context.Context, identity common.Identity) ([]org.ExternalOrganization, error)

func (*AAPProvider) IsMemberOf

func (p *AAPProvider) IsMemberOf(ctx context.Context, identity common.Identity, externalOrgID string) (bool, error)

type ClaimsProvider

type ClaimsProvider struct{}

func (*ClaimsProvider) GetUserOrganizations

func (c *ClaimsProvider) GetUserOrganizations(ctx context.Context, identity common.Identity) ([]org.ExternalOrganization, error)

func (*ClaimsProvider) IsMemberOf

func (c *ClaimsProvider) IsMemberOf(ctx context.Context, identity common.Identity, externalOrgID string) (bool, error)

type ExternalOrganizationProvider

type ExternalOrganizationProvider interface {
	// GetUserOrganizations returns all orgs a user is a member of.
	GetUserOrganizations(ctx context.Context, identity common.Identity) ([]org.ExternalOrganization, error)

	// IsMemberOf checks if a user is a member of a specific org.
	// externalOrgID should be the external organization ID as defined by the IdP.
	IsMemberOf(ctx context.Context, identity common.Identity, externalOrgID string) (bool, error)
}

ExternalOrganizationProvider provides external organization information for a user.

Jump to

Keyboard shortcuts

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