restapi

package
v0.1.1 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: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PubKey                    []byte
	KID                       string
	VerificationMethodType    string
	ResolutionPath            string
	OperationPath             string
	WebCASPath                string
	BaseURL                   string
	DiscoveryDomains          []string
	DiscoveryMinimumResolvers int
}

Config defines configuration for discovery operations.

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"errMessage,omitempty"`
}

ErrorResponse to send error message in the response.

type Operation

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

Operation defines handlers for discovery operations.

func New

func New(c *Config) (*Operation, error)

New returns discovery operations.

func (*Operation) GetRESTHandlers

func (o *Operation) GetRESTHandlers() []common.HTTPHandler

GetRESTHandlers get all controller API handler available for this service.

type RawDoc

type RawDoc struct {
	Context              string               `json:"@context"`
	ID                   string               `json:"id"`
	VerificationMethod   []verificationMethod `json:"verificationMethod"`
	Authentication       []string             `json:"authentication"`
	AssertionMethod      []string             `json:"assertionMethod"`
	CapabilityDelegation []string             `json:"capabilityDelegation"`
	CapabilityInvocation []string             `json:"capabilityInvocation"`
}

RawDoc did document.

type WebFingerLink struct {
	Rel  string `json:"rel,omitempty"`
	Type string `json:"type,omitempty"`
	Href string `json:"href,omitempty"`
}

WebFingerLink web finger link.

type WebFingerResponse

type WebFingerResponse struct {
	Subject    string                 `json:"subject,omitempty"`
	Properties map[string]interface{} `json:"properties,omitempty"`
	Links      []WebFingerLink        `json:"links,omitempty"`
}

WebFingerResponse web finger response.

type WellKnownResponse

type WellKnownResponse struct {
	ResolutionEndpoint string `json:"resolutionEndpoint,omitempty"`
	OperationEndpoint  string `json:"operationEndpoint,omitempty"`
}

WellKnownResponse well known response.

Jump to

Keyboard shortcuts

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