meta

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetaKeyAppID      = "meta_app_id"
	MetaKeyAppSecret  = "meta_app_secret"
	MetaKeyAPIVersion = "meta_api_version"
)

Metadata keys stored in Credential.Metadata.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{}

Provider implements provider.CredentialProvider for Meta Graph API.

func (*Provider) CanRefresh

func (p *Provider) CanRefresh(cred *provider.Credential) bool

CanRefresh reports whether this credential can be refreshed. Requires both app ID and app secret in metadata.

func (*Provider) Cleanup

func (p *Provider) Cleanup(cleanupPath string)

Cleanup cleans up Meta resources. Nothing to do.

func (*Provider) ConfigureProxy

func (p *Provider) ConfigureProxy(proxy provider.ProxyConfigurer, cred *provider.Credential)

ConfigureProxy sets up proxy headers for Meta Graph API.

func (*Provider) ContainerEnv

func (p *Provider) ContainerEnv(cred *provider.Credential) []string

ContainerEnv returns environment variables for Meta. None needed.

func (*Provider) ContainerMounts

func (p *Provider) ContainerMounts(cred *provider.Credential, containerHome string) ([]provider.MountConfig, string, error)

ContainerMounts returns mounts for Meta. None needed.

func (*Provider) Grant

func (p *Provider) Grant(ctx context.Context) (*provider.Credential, error)

Grant acquires Meta credentials interactively or from environment.

Token acquisition:

  1. META_ACCESS_TOKEN environment variable
  2. Interactive prompt

Optionally collects META_APP_ID and META_APP_SECRET for token refresh.

func (*Provider) ImpliedDependencies

func (p *Provider) ImpliedDependencies() []string

ImpliedDependencies returns dependencies implied by this provider. None.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider identifier.

func (*Provider) Refresh

Refresh exchanges the current token for a new long-lived token via Meta's fb_exchange_token endpoint and updates the proxy.

func (*Provider) RefreshInterval

func (p *Provider) RefreshInterval() time.Duration

RefreshInterval returns how often to attempt refresh.

Jump to

Keyboard shortcuts

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