kc

package
v0.58.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	KopanoGCIDClaim = "kopano/gc/id"
)

Define claims supported by KC.

View Source
const (
	ScopeKopanoGC = "kopano/gc"
)

Define scopes supported by KC.

Variables

View Source
var (
	KCServerDefaultFamilyNameProperty = kcc.PR_SURNAME_A
	KCServerDefaultGivenNameProperty  = kcc.PR_GIVEN_NAME_A
)

Property mappings for Kopano Server user meta data.

Functions

This section is empty.

Types

type KCIdentifierBackend

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

KCIdentifierBackend is a backend for the Identifier which connects to Kopano Core via kcc-go.

func NewKCIdentifierBackend

func NewKCIdentifierBackend(c *config.Config, client *kcc.KCC, useGlobalSession bool, username string, password string) (*KCIdentifierBackend, error)

NewKCIdentifierBackend creates a new KCIdentifierBackend with the provided parameters.

func (*KCIdentifierBackend) DestroySession

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

DestroySession implements the Backend interface providing destroy to KC session.

func (*KCIdentifierBackend) GetUser

func (b *KCIdentifierBackend) GetUser(ctx context.Context, userEntryID string, sessionRef *string, requestedScopes map[string]bool) (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 (*KCIdentifierBackend) Logon

func (b *KCIdentifierBackend) 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 (*KCIdentifierBackend) Name

func (b *KCIdentifierBackend) Name() string

Name implements the Backend interface.

func (*KCIdentifierBackend) RefreshSession

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

RefreshSession implements the Backend interface providing refresh to KC session.

func (*KCIdentifierBackend) RegisterManagers

func (b *KCIdentifierBackend) RegisterManagers(mgrs *managers.Managers) error

RegisterManagers registers the provided managers,

func (*KCIdentifierBackend) ResolveUserByUsername

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

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

func (*KCIdentifierBackend) RunWithContext

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

RunWithContext implements the Backend interface. KCIdentifierBackends keep a session to the accociated Kopano Core client. This session is auto renewed and auto rerestablished and is bound to the provided Context.

func (*KCIdentifierBackend) ScopesMeta

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

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

func (*KCIdentifierBackend) ScopesSupported

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

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

func (*KCIdentifierBackend) UserClaims

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

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

Jump to

Keyboard shortcuts

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