aap

package
v0.0.0-...-53608c7 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginReadTx

func BeginReadTx(driver neo4j.Driver, configurers ...func(*neo4j.TransactionConfig)) (neo4j.Session, neo4j.Transaction, error)

func BeginWriteTx

func BeginWriteTx(driver neo4j.Driver, configurers ...func(*neo4j.TransactionConfig)) (neo4j.Session, neo4j.Transaction, error)

func DeleteGrant

func DeleteGrant(tx neo4j.Transaction, iGrant Grant) (err error)

func DeleteGrants

func DeleteGrants(tx neo4j.Transaction, iGrants []Grant) (err error)

func DeleteShadow

func DeleteShadow(tx neo4j.Transaction, iShadow Shadow) (err error)

func EmitEventConsentCreated

func EmitEventConsentCreated(natsConnection *nats.Conn, consent Consent)

func SyncScopesToHydra

func SyncScopesToHydra(tx neo4j.Transaction, iClient Identity) (err error)

Types

type Client

type Client struct {
	ClientId     string
	ClientSecret string
	Name         string
	Description  string
}
type Consent struct {
	Identity   Identity
	Subscriber Identity
	Publisher  Identity
	Scope      Scope
}

func CreateConsent

func CreateConsent(tx neo4j.Transaction, iOwner Identity, iSubscriber Identity, iPublisher Identity, iScopes Scope) (consent Consent, err error)

func DeleteConsent

func DeleteConsent(tx neo4j.Transaction, iOwner Identity, iSubscriber Identity, iPublisher Identity, iScopes Scope) (consent Consent, err error)

func FetchConsents

func FetchConsents(tx neo4j.Transaction, iOwner Identity, iSubscriber Identity, iPublisher Identity, iScopes []Scope) (rConsents []Consent, err error)

type Grant

type Grant struct {
	Identity       Identity
	Scope          Scope
	Publisher      Identity
	OnBehalfOf     Identity
	MayGrantScopes []Scope
	GrantRule      GrantRule
}

func CreateGrant

func CreateGrant(tx neo4j.Transaction, iReceive Identity, iScope Scope, iPublishedBy Identity, iOnBehalfOf Identity, iNotBefore int64, iExpire int64) (rGrant Grant, err error)

func CreateGrants

func CreateGrants(tx neo4j.Transaction, iGrants []Grant) (rGrants []Grant, err error)

func FetchGrants

func FetchGrants(tx neo4j.Transaction, iGranted Identity, iFilterScopes []Scope, iFilterPublishers []Identity, iFilterOnBehalfOf []Identity) (grants []Grant, err error)

type GrantRule

type GrantRule struct {
	NotBefore int64
	Expire    int64
}

type Human

type Human struct {
	Id       string
	Password string
	Name     string
	Email    string
}

type Identity

type Identity struct {
	Id string
}

func CreateEntity

func CreateEntity(tx neo4j.Transaction, iEntity Identity, iCreator Identity, iScopes []string) (rEntity Identity, err error)

func FetchEntities

func FetchEntities(tx neo4j.Transaction, iEntities []Identity) (entities []Identity, err error)

type Publish

type Publish struct {
	Publisher      Identity
	Scope          Scope
	Rule           PublishRule
	MayGrantScopes []Scope
	MayGrantRules  []PublishRule
}

func CreatePublishes

func CreatePublishes(tx neo4j.Transaction, requestedBy Identity, newPublish Publish) (publish Publish, err error)

func FetchPublishes

func FetchPublishes(tx neo4j.Transaction, iFilterPublisher Identity, iFilterScopes []Scope) (publishes []Publish, err error)

type PublishRule

type PublishRule struct {
	Title       string
	Description string
}

type ResourceServer

type ResourceServer struct {
	Name        string
	Audience    string
	Description string
}

func FetchResourceServerByAudience

func FetchResourceServerByAudience(driver neo4j.Driver, aud string) (*ResourceServer, error)

@TODO @FIXME this is idp stuff

type Scope

type Scope struct {
	Name string
}

func CreateScope

func CreateScope(tx neo4j.Transaction, iScope Scope, iRequest Identity) (rScope Scope, err error)

func FetchScopes

func FetchScopes(driver neo4j.Driver, inputScopes []Scope) ([]Scope, error)

type Shadow

type Shadow struct {
	Identity  Identity
	Shadow    Identity
	GrantRule GrantRule
}

func CreateShadow

func CreateShadow(tx neo4j.Transaction, iIdentity Identity, iShadow Identity, iNotBefore int64, iExpire int64) (rShadow Shadow, err error)

func FetchShadows

func FetchShadows(tx neo4j.Transaction, iFilterIdentities []Identity, iFilterShadows []Identity) (rShadows []Shadow, err error)

type Subscription

type Subscription struct {
	Subscriber Identity
	Publisher  Identity
	Scope      Scope
}

func CreateSubscription

func CreateSubscription(tx neo4j.Transaction, iSubscription Subscription, iRequest Identity) (rSubscription Subscription, err error)

func FetchSubscriptions

func FetchSubscriptions(tx neo4j.Transaction, iFilterSubscriber Identity, iFilterPublisher Identity, iFilterScopes []Scope) (rSubscriptions []Subscription, err error)

type Verdict

type Verdict struct {
	Publisher       Identity
	Requestor       Identity
	RequestedScopes []Scope
	GrantedScopes   []Scope
	MissingScopes   []Scope
	Owners          []Identity
	Granted         bool
}

func Judge

func Judge(tx neo4j.Transaction, iPublisher Identity, iRequestor Identity, iScopes []Scope, iFilterOwners []Identity) (verdict Verdict, err error)

Jump to

Keyboard shortcuts

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