libregraph

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenTypeExtensionType = "#microsoft.graph.openTypeExtension"

	IdentityClaimsExtensionName    = "libregraph.identityClaims"
	IDTokenClaimsExtensionName     = "libregraph.idTokenClaims"
	AccessTokenClaimsExtensionName = "libregraph.accessTokenClaims"
	RequestedScopesExtensionName   = "libregraph.requestedScopes"
	SessionExtensionName           = "libregraph.session"
)

Variables

View Source
var ErrUnauthorized = errors.New("libregraph identifier backend request unauthorized")

ErrUnauthorized is returned when the backend answered a request as unauthorized. For user lookups this usually means that the session which was sent along is no longer valid, for example because it was revoked. It is deliberately not the same as an unknown user, which is no error at all.

Functions

This section is empty.

Types

type LibreGraphIdentifierBackend

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

func NewLibreGraphIdentifierBackend

func NewLibreGraphIdentifierBackend(
	c *config.Config,
	tlsConfig *tls.Config,
	baseURI string,
	baseURIByScope *ordered_map.OrderedMap,
	clients *identityClients.Registry,
) (*LibreGraphIdentifierBackend, error)

func (*LibreGraphIdentifierBackend) DestroySession

func (b *LibreGraphIdentifierBackend) DestroySession(ctx context.Context, sessionRef *string) error

DestroySession implements the Backend interface providing explicit revoke of the backend session.

func (*LibreGraphIdentifierBackend) GetUser

func (b *LibreGraphIdentifierBackend) GetUser(ctx context.Context, entryID string, sessionRef *string, requestedScopes map[string]bool, lookup *identity.LookupContext) (backends.UserFromBackend, error)

GetUser implements the Backend interface, providing user meta data retrieval for the user specified by the userID. Requests are bound to the provided context.

func (*LibreGraphIdentifierBackend) Logon

func (b *LibreGraphIdentifierBackend) Logon(ctx context.Context, audience, username, password string) (bool, *string, *string, backends.UserFromBackend, error)

Logon implements the Backend interface, enabling Logon with user name and password as provided. Requests are bound to the provided context.

func (*LibreGraphIdentifierBackend) Name

Name implements the Backend interface.

func (*LibreGraphIdentifierBackend) RefreshSession

func (b *LibreGraphIdentifierBackend) RefreshSession(ctx context.Context, userID string, sessionRef *string, claims map[string]interface{}) error

RefreshSession implements the Backend interface.

func (*LibreGraphIdentifierBackend) ResolveUserByUsername

func (b *LibreGraphIdentifierBackend) ResolveUserByUsername(ctx context.Context, username string) (backends.UserFromBackend, error)

ResolveUserByUsername implements the Backend interface, providing lookup for user by providing the username. Requests are bound to the provided context.

func (*LibreGraphIdentifierBackend) RunWithContext

func (b *LibreGraphIdentifierBackend) RunWithContext(ctx context.Context) error

RunWithContext implements the Backend interface.

func (*LibreGraphIdentifierBackend) ScopesMeta

func (b *LibreGraphIdentifierBackend) ScopesMeta() *scopes.Scopes

ScopesMeta implements the Backend interface, providing meta data for supported scopes.

func (*LibreGraphIdentifierBackend) ScopesSupported

func (b *LibreGraphIdentifierBackend) ScopesSupported() []string

ScopesSupported implements the Backend interface, providing supported scopes when running this backend.

func (*LibreGraphIdentifierBackend) UserClaims

func (b *LibreGraphIdentifierBackend) UserClaims(userID string, authorizedScopes map[string]bool) map[string]interface{}

UserClaims implements the Backend interface, providing user specific claims for the user specified by the userID.

Jump to

Keyboard shortcuts

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