oryclient

package
v0.0.0-...-d96d6cb Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func (*Client) Authorize

func (c *Client) Authorize(ctx context.Context, accessToken string) (context.Context, error)

func (*Client) GetOryTokenUrl

func (c *Client) GetOryTokenUrl() string

func (*Client) GetPAT

func (c *Client) GetPAT() string

func (*Client) GetServiceOauthCredential

func (c *Client) GetServiceOauthCredential(ctx context.Context, serviceName string) (*OauthAccessCredential, error)

func (*Client) GetSessionTokenFromContext

func (c *Client) GetSessionTokenFromContext(ctx context.Context) (string, error)

func (*Client) GetURL

func (c *Client) GetURL() string

type Config

type Config struct {
	OryEntityName        string `envconfig:"ORY_ENTITY_NAME" required:"true"`
	CredentialIdentifier string `envconfig:"ORY_CRED_IDENTIFIER" required:"true"`
}

type OauthAccessCredential

type OauthAccessCredential struct {
	OryPAT      string
	OryURL      string
	AccessToken string
}

type OryClient

type OryClient interface {
	GetSessionTokenFromContext(ctx context.Context) (string, error)
	Authorize(ctx context.Context, accessToken string) (context.Context, error)
	GetServiceOauthCredential(ctx context.Context, serviceName string) (*OauthAccessCredential, error)
	GetURL() string
	GetPAT() string
}

func NewOryClient

func NewOryClient(log logging.Logger) (OryClient, error)

Jump to

Keyboard shortcuts

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