plugin

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Handshake = hplugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "SYFON_AUTHZ_PLUGIN",
	MagicCookieValue: "syfon_authz_plugin_v1",
}

Handshake is the plugin handshake configuration for hashicorp/go-plugin

Functions

This section is empty.

Types

type AuthenticationInput

type AuthenticationInput struct {
	RequestID  string
	AuthHeader string
	Metadata   map[string]interface{}
}

AuthenticationInput is the request sent to the plugin for authentication.

type AuthenticationOutput

type AuthenticationOutput struct {
	Authenticated bool
	Subject       string
	Claims        map[string]interface{}
	Reason        string
}

AuthenticationOutput is the plugin's response.

type AuthenticationPlugin

type AuthenticationPlugin interface {
	Authenticate(ctx context.Context, in *AuthenticationInput) (*AuthenticationOutput, error)
}

AuthenticationPlugin is the interface plugins must implement.

type AuthorizationInput

type AuthorizationInput struct {
	RequestID string
	Subject   string
	Action    string
	Resource  string
	Claims    map[string]interface{}
	Metadata  map[string]interface{}
}

AuthorizationInput is the request sent to the plugin for an authz decision.

type AuthorizationOutput

type AuthorizationOutput struct {
	Allow       bool
	Reason      string
	Obligations map[string]interface{}
}

AuthorizationOutput is the plugin's response.

type AuthorizationPlugin

type AuthorizationPlugin interface {
	Authorize(ctx context.Context, in *AuthorizationInput) (*AuthorizationOutput, error)
}

AuthorizationPlugin is the interface plugins must implement.

Jump to

Keyboard shortcuts

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