gnap

package module
v0.0.0-...-812a07f Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	Value     string        `json:"value"`
	Label     string        `json:"label,omitempty"`
	Access    []TokenAccess `json:"access"`
	ExpiresIn int           `json:"expires_in,omitempty"`
	Flags     []string      `json:"flags,omitempty"`
}

AccessToken https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-3.2.1

type AuthRequest

type AuthRequest struct {
	// TODO: single TokenRequest is treated like a slice of one element.
	AccessToken []*TokenRequest  `json:"access_token,omitempty"`
	Client      *RequestClient   `json:"client,omitempty"`
	Interact    *RequestInteract `json:"interact,omitempty"`
}

AuthRequest https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-2

func (*AuthRequest) MarshalJSON

func (a *AuthRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*AuthRequest) UnmarshalJSON

func (a *AuthRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler..

type AuthResponse

type AuthResponse struct {
	Continue    ResponseContinue `json:"continue,omitempty"`
	AccessToken []AccessToken    `json:"access_token,omitempty"`
	Interact    ResponseInteract `json:"interact,omitempty"`
	InstanceID  string           `json:"instance_id,omitempty"`
}

AuthResponse https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-3

type ClientKey

type ClientKey struct {
	Proof string          `json:"proof"`
	JWK   json.RawMessage `json:"jwk"`
}

ClientKey https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-7.1.1

type ContinueRequest

type ContinueRequest struct {
	InteractRef string `json:"interact_ref"`
}

ContinueRequest https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-5.1

type ErrorResponse

type ErrorResponse struct {
	Error       string `json:"error"`
	Description string `json:"error_description,omitempty"`
}

ErrorResponse https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-3.6

type IntrospectRequest

type IntrospectRequest struct {
	AccessToken    string         `json:"access_token"`
	Proof          string         `json:"proof"`
	Access         []TokenAccess  `json:"access,omitempty"`
	ResourceServer *RequestClient `json:"resource_server,omitempty"`
}

IntrospectRequest https://www.ietf.org/archive/id/draft-ietf-gnap-resource-servers-01.html#section-3.3

type IntrospectResponse

type IntrospectResponse struct {
	Active bool          `json:"active"`
	Access []TokenAccess `json:"access,omitempty"`
	Key    *ClientKey    `json:"key,omitempty"`
	Flags  []string      `json:"flags,omitempty"`
}

IntrospectResponse https://www.ietf.org/archive/id/draft-ietf-gnap-resource-servers-01.html#section-3.3

type RequestClient

type RequestClient struct {
	IsReference bool
	Ref         string
	Key         *ClientKey `json:"key"`
}

RequestClient https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-2.3

func (*RequestClient) MarshalJSON

func (r *RequestClient) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*RequestClient) UnmarshalJSON

func (r *RequestClient) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

type RequestFinish

type RequestFinish struct {
	Method string `json:"method"`
	URI    string `json:"uri"`
	Nonce  string `json:"nonce"`
}

RequestFinish https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-2.5.2

type RequestInteract

type RequestInteract struct {
	Start  []string      `json:"start"`
	Finish RequestFinish `json:"finish"`
}

RequestInteract https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-2.5

type ResponseContinue

type ResponseContinue struct {
	URI         string      `json:"uri"`
	AccessToken AccessToken `json:"access_token"`
	Wait        int         `json:"wait"`
}

ResponseContinue https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-3.1

type ResponseInteract

type ResponseInteract struct {
	Redirect string `json:"redirect"`
	Finish   string `json:"finish"`
}

ResponseInteract https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-3.3

type TokenAccess

type TokenAccess struct {
	IsReference bool
	Ref         string
	Type        string `json:"type"`
	Raw         json.RawMessage
}

TokenAccess represents a GNAP token access descriptor, either as a string reference or as an object.

see: https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-8

func (*TokenAccess) MarshalJSON

func (t *TokenAccess) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*TokenAccess) UnmarshalJSON

func (t *TokenAccess) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

type TokenRequest

type TokenRequest struct {
	Access []TokenAccess `json:"access"`
	Label  string        `json:"label,omitempty"`
	Flags  []string      `json:"flags,omitempty"`
}

TokenRequest https://www.ietf.org/archive/id/draft-ietf-gnap-core-protocol-09.html#section-2.1

Directories

Path Synopsis
clientverifier

Jump to

Keyboard shortcuts

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