model

package
v0.0.0-...-702c227 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const ISharePermitEffect string = "Permit"

* * Constant indicating the "permit" effect as defined by iShare

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationRegistry

type AuthorizationRegistry struct {
	Id   string `json:"id,omitempty"`
	Host string `json:"host"`
	// will use default path it not included - {host}/connect/token
	TokenPath string `json:"tokenPath,omitempty"`
	// will use default path it not included - {host}/delegation
	DelegationPath string `json:"delegationPath,omitempty"`
}

func (AuthorizationRegistry) GetDelegationAddress

func (ar AuthorizationRegistry) GetDelegationAddress() string

func (AuthorizationRegistry) GetTokenAddress

func (ar AuthorizationRegistry) GetTokenAddress() string

type ClientToken

type ClientToken interface {
	GetIssuer() string
	Valid() error
}

type CredentialSubject

type CredentialSubject struct {
	Id string `json:"id,omitempty"`
	*GaiaXSubject
	*IShareCredentialsSubject
	*Roles
}

type DSBAToken

type DSBAToken struct {
	VerifiableCredential *DSBAVerifiableCredential `json:"verifiableCredential"`
	jwt.RegisteredClaims
}

type DSBAVerifiableCredential

type DSBAVerifiableCredential struct {
	Context           []string          `json:"@context,omitempty"`
	Id                string            `json:"id,omitempty"`
	Type              []string          `json:"type,omitempty"`
	Issuer            string            `json:"issuer,omitempty"`
	IssuanceDate      string            `json:"issuanceDate,omitempty"`
	ValidFrom         string            `json:"validFrom,omitempty"`
	ExpirationDate    string            `json:"expirationDate,omitempty"`
	CredentialSubject CredentialSubject `json:"credentialSubject,omitempty"`
}

type Decision

type Decision struct {
	Decision bool   `json:"decision"`
	Reason   string `json:"reason"`
}

type Delegation

type Delegation struct {
	Issuer             string             `json:"iss,omitempty"`
	Subject            string             `json:"sub,omitempty"`
	JwtId              string             `json:"jti,omitempty"`
	IssuedAt           int                `json:"iat,omitempty"`
	Expiry             int                `json:"exp,omitempty"`
	Audience           string             `json:"aud,omitempty"`
	DelegationEvidence DelegationEvidence `json:"delegationEvidence,omitempty"`
}

type DelegationEvidence

type DelegationEvidence struct {
	NotBefore    int64            `json:"notBefore,omitempty"`
	NotOnOrAfter int64            `json:"notOnOrAfter,omitempty"`
	PolicyIssuer string           `json:"policyIssuer,omitempty"`
	Target       DelegationTarget `json:"target,omitempty"`
	PolicySets   []PolicySet      `json:"policySets,omitempty"`
}

type DelegationRequest

type DelegationRequest struct {
	PolicyIssuer   string            `json:"policyIssuer,omitempty"`
	Target         *DelegationTarget `json:"target,omitempty"`
	PolicySets     []*PolicySet      `json:"policySets,omitempty"`
	DelegationPath []string          `json:"delegation_path,omitempty"`
	PreviousSteps  []string          `json:"previous_steps,omitempty"`
}

type DelegationRequestWrapper

type DelegationRequestWrapper struct {
	DelegationRequest *DelegationRequest `json:"delegationRequest,omitempty"`
}

type DelegationResponse

type DelegationResponse struct {
	DelegationToken string `json:"delegation_token,omitempty"`
}

type DelegationTarget

type DelegationTarget struct {
	AccessSubject string `json:"accessSubject,omitempty"`
}

type Environment

type Environment struct {
	ServiceProviders []string `json:"serviceProviders,omitempty"`
}

type GaiaXSubject

type GaiaXSubject struct {
	Type string `json:"type,omitempty"`
}

type GaiaXToken

type GaiaXToken struct {
	VerifiablePresentation []interface{} `json:"verifiablePresentation"`
	jwt.RegisteredClaims
}

type HttpError

type HttpError struct {
	Status    int
	Message   string
	RootError error
}

func (HttpError) Error

func (err HttpError) Error() string

func (HttpError) GetRoot

func (err HttpError) GetRoot() error

type IShareCredentialsSubject

type IShareCredentialsSubject struct {
	// information about the authorization registry, to retrieve the policies for the issuer
	AuthorizationRegistries *map[string]AuthorizationRegistry `json:"authorizationRegistry,omitempty"`
}

type IShareToken

type IShareToken struct {
	DelegationEvidence DelegationEvidence `json:"delegationEvidence,omitempty"`
	jwt.RegisteredClaims
}

func (IShareToken) GetIssuer

func (ist IShareToken) GetIssuer() string

type PartyInfo

type PartyInfo struct {
	PartyId      string                `json:"party_id"`
	PartyName    string                `json:"party_name"`
	Certificates *[]TrustedCertificate `json:"certificates"`
}

type PartyToken

type PartyToken struct {
	PartyInfo *PartyInfo `json:"party_info"`
	jwt.RegisteredClaims
}

func (PartyToken) GetIssuer

func (ist PartyToken) GetIssuer() string

type Policy

type Policy struct {
	Target *PolicyTarget `json:"target,omitempty"`
	Rules  []Rule        `json:"rules,omitempty"`
}

type PolicySet

type PolicySet struct {
	MaxDelegationDepth int              `json:"maxDelegationDepth,omitempty"`
	Target             *PolicySetTarget `json:"target,omitempty"`
	Policies           []Policy         `json:"policies,omitempty"`
}

type PolicySetEnvironment

type PolicySetEnvironment struct {
	Licenses []string `json:"licenses,omitempty"`
}

type PolicySetTarget

type PolicySetTarget struct {
	Environment *PolicySetEnvironment `json:"environment,omitempty"`
}

type PolicyTarget

type PolicyTarget struct {
	Resource    *Resource    `json:"resource,omitempty"`
	Actions     []string     `json:"actions,omitempty"`
	Environment *Environment `json:"environment,omitempty"`
}

type ProblemDetails

type ProblemDetails struct {
	Type     string `json:"type"`
	Title    string `json:"title"`
	Status   int    `json:"status"`
	Detail   string `json:"detail,omitempty"`
	Instance string `json:"instance,omitempty"`
}

type Resource

type Resource struct {
	Type        string   `json:"type,omitempty"`
	Identifiers []string `json:"identifiers,omitempty"`
	Attributes  []string `json:"attributes,omitempty"`
}

type Role

type Role struct {
	// name of the role, for example READER
	Names    []string `json:"names,omitempty"`
	Target   string   `json:"target,omitempty"`
	Provider string   `json:"provider,omitempty"`
}

type Roles

type Roles struct {
	Roles []Role `json:"roles,omitempty"`
}

type Rule

type Rule struct {
	Effect string      `json:"effect,omitempty"`
	Target *RuleTarget `json:"target,omitempty"`
}

type RuleTarget

type RuleTarget struct {
	Resource *Resource `json:"resource,omitempty"`
	Actions  []string  `json:"actions,omitempty"`
}

type TrustedCertificate

type TrustedCertificate struct {
	SubjectName    string `json:"subject_name"`
	CertficateType string `json:"certifcate_type"`
	EnabledFrom    string `json:"enabled_from"`
	X5c            string `json:"x5c"`
	X5cS256        string `json:"x5t#S256"`
}

type TrustedListResponse

type TrustedListResponse struct {
	TrustedListToken string `json:"trusted_list_token"`
}

type TrustedListToken

type TrustedListToken struct {
	TrustedList *[]TrustedParticipant `json:"trusted_list"`
	jwt.RegisteredClaims
}

func (TrustedListToken) GetIssuer

func (ist TrustedListToken) GetIssuer() string

type TrustedParticipant

type TrustedParticipant struct {
	Subject                string `json:"subject"`
	CertificateFingerprint string `json:"certificate_fingerprint"`
	Validity               string `json:"validity"`
	Status                 string `json:"status"`
}

type TrustedPartyResponse

type TrustedPartyResponse struct {
	PartyToken string `json:"party_token"`
}

Jump to

Keyboard shortcuts

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