onetimetoken

package
v0.0.0-...-d6d012e Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConverter

func NewConverter(legacyConnectorURL string) *converter

NewConverter missing godoc

func NewTokenService

func NewTokenService(sysAuthSvc SystemAuthService, appSvc ApplicationService, appConverter ApplicationConverter, extTenantsSvc ExternalTenantsService, doer HTTPDoer, tokenGenerator TokenGenerator, config Config, pairingAdapters *pkgadapters.Adapters, timeService directorTime.Service) *service

NewTokenService missing godoc

func UnmarshalScenarioGroups

func UnmarshalScenarioGroups(rawScenarioGroups []string) ([]pairing.ScenarioGroup, error)

UnmarshalScenarioGroups parses rawScenarioGroups into a slice of pairing.ScenarioGroup

Types

type ApplicationConverter

type ApplicationConverter interface {
	ToGraphQL(in *model.Application) *graphql.Application
}

ApplicationConverter missing godoc

type ApplicationService

type ApplicationService interface {
	Get(ctx context.Context, id string) (*model.Application, error)
	ListLabels(ctx context.Context, applicationID string) (map[string]*model.Label, error)
}

ApplicationService missing godoc

type Config

type Config struct {
	Length                int           `envconfig:"default=64"`
	RuntimeExpiration     time.Duration `envconfig:"default=60m"`
	ApplicationExpiration time.Duration `envconfig:"default=5m"`
	CSRExpiration         time.Duration `envconfig:"default=5m"`

	ConnectorURL          string `envconfig:"APP_CONNECTOR_URL"`
	LegacyConnectorURL    string `envconfig:"APP_LEGACY_CONNECTOR_URL"`
	SuggestTokenHeaderKey string `envconfig:"APP_SUGGEST_TOKEN_HTTP_HEADER"`
}

Config missing godoc

type ExternalTenantsService

type ExternalTenantsService interface {
	GetTenantByID(ctx context.Context, id string) (*model.BusinessTenantMapping, error)
	ListByIDsAndType(ctx context.Context, ids []string, tenantType tenantpkg.Type) ([]*model.BusinessTenantMapping, error)
}

ExternalTenantsService missing godoc

type HTTPDoer

type HTTPDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPDoer missing godoc

type Resolver

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

Resolver missing godoc

func NewTokenResolver

func NewTokenResolver(transact persistence.Transactioner, svc TokenService, conv TokenConverter, suggestTokenHeaderKey string) *Resolver

NewTokenResolver missing godoc

func (*Resolver) Raw

func (r *Resolver) Raw(ctx context.Context, obj *graphql.TokenWithURL) (*string, error)

Raw missing godoc

func (*Resolver) RawEncoded

func (r *Resolver) RawEncoded(ctx context.Context, obj *graphql.TokenWithURL) (*string, error)

RawEncoded missing godoc

func (*Resolver) RequestOneTimeTokenForApplication

func (r *Resolver) RequestOneTimeTokenForApplication(ctx context.Context, id string, systemAuthID *string) (*graphql.OneTimeTokenForApplication, error)

RequestOneTimeTokenForApplication missing godoc

func (*Resolver) RequestOneTimeTokenForRuntime

func (r *Resolver) RequestOneTimeTokenForRuntime(ctx context.Context, id string, systemAuthID *string) (*graphql.OneTimeTokenForRuntime, error)

RequestOneTimeTokenForRuntime missing godoc

type SystemAuthService

type SystemAuthService interface {
	Create(ctx context.Context, objectType pkgmodel.SystemAuthReferenceObjectType, objectID string, authInput *model.AuthInput) (string, error)
	GetByToken(ctx context.Context, token string) (*pkgmodel.SystemAuth, error)
	GetGlobal(ctx context.Context, authID string) (*pkgmodel.SystemAuth, error)
	Update(ctx context.Context, item *pkgmodel.SystemAuth) error
}

SystemAuthService missing godoc

type TokenConverter

type TokenConverter interface {
	ToGraphQLForRuntime(model model.OneTimeToken) graphql.OneTimeTokenForRuntime
	ToGraphQLForApplication(model model.OneTimeToken) (graphql.OneTimeTokenForApplication, error)
}

TokenConverter missing godoc

type TokenGenerator

type TokenGenerator interface {
	NewToken() (string, error)
}

TokenGenerator missing godoc

func NewTokenGenerator

func NewTokenGenerator(tokenLength int) TokenGenerator

NewTokenGenerator missing godoc

type TokenService

type TokenService interface {
	GenerateOneTimeToken(ctx context.Context, runtimeID string, tokenType pkgmodel.SystemAuthReferenceObjectType) (*model.OneTimeToken, error)
	RegenerateOneTimeToken(ctx context.Context, sysAuthID string) (*model.OneTimeToken, error)
}

TokenService missing godoc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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