identity

package
v0.0.1-dev.23 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 8 Imported by: 1 module, 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

This section is empty.

Variables

View Source
var (
	ErrOwnership   = errors.New("resource registration ownership conflict")
	ErrUnavailable = errors.New("resource registration unavailable")
)

Functions

func NewHandler

func NewHandler(backend Backend, bearer string) http.Handler

Types

type Backend

type Backend interface {
	Ensure(context.Context, Spec) error
}

Backend holds each owner's resource servers. Ensure leaves the owner holding exactly the audiences of its Spec, so a Spec with none removes them all.

type Client

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

func NewClient

func NewClient(endpoint, bearer string, transport *http.Client) (*Client, error)

func (*Client) Ensure

func (c *Client) Ensure(ctx context.Context, spec Spec) error

type PermissionSet

type PermissionSet struct {
	Kind string `json:"kind"`
	UID  string `json:"uid"`
}

func (PermissionSet) Validate

func (s PermissionSet) Validate() error

type Spec

type Spec struct {
	Kind      string                   `json:"kind"`
	UID       string                   `json:"uid"`
	Audiences []string                 `json:"audiences,omitempty"`
	Bindings  map[string]PermissionSet `json:"bindings,omitempty"`
	Scopes    []string                 `json:"scopes,omitempty"`
}

Spec is every resource server its owner, a Kind and UID, holds. Each of Audiences is a resource indicator as RFC 8707 §2 defines it, and Scopes are the scope tokens in the RFC 6749 §3.3 grammar that each of them holds.

func (Spec) Validate

func (s Spec) Validate() error

Directories

Path Synopsis
Package conformance tests a live issuer and adapter against the rules of package profile.
Package conformance tests a live issuer and adapter against the rules of package profile.
internal
Package invitation defines Holon's invitation operation.
Package invitation defines Holon's invitation operation.
Package profile states what Holon requires of an identity backend, so a backend is built against the standards and not against one provider.
Package profile states what Holon requires of an identity backend, so a backend is built against the standards and not against one provider.
Package scim is the part of SCIM 2.0 Holon needs from an identity backend: users, the groups that stand for permission sets, and what the backend can do.
Package scim is the part of SCIM 2.0 Holon needs from an identity backend: users, the groups that stand for permission sets, and what the backend can do.

Jump to

Keyboard shortcuts

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