peasant

package module
v0.0.3 Latest Latest
Warning

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

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

README

Candango Go Peasant

Peasant is a protocol abstraction of how to control agents that need to communicate with a central entity or entities.

We define agents as peasants and central entities (bases) as bastions.

This project won't define the implementation, security level neither levels of redundancies but instead a minimal contract of what should be implemented.

A bastion/peasant relationship could be defined as stateful or not. If stateful it is necessary to implement a session control in the bastion where peasants need to perform knocks (as knock at the door) for permission or a valid session. In a stateless case we just ignore any knock implementation.

What must be implemented in the protocol are nonce generation, consumption and validation on both sides and a directory list of available resources offered by a bastion for peasants to consume.

Support

GoPeasat is one of Candango Open Source Group initiatives. Available under the Apache License, Version 2.0.

This site and all documentation are licensed under Creative Commons 3.0.

Copyright © 2023 Flavio Gonçalves Garcia

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Nonced added in v0.0.3

func Nonced(resp http.ResponseWriter, req *http.Request,
	service NonceService) (err error)

Types

type NonceService

type NonceService interface {
	Block(http.ResponseWriter, *http.Request) error
	Clear(string) error
	Consume(http.ResponseWriter, *http.Request, string) (bool, error)
	GetNonce(*http.Request) (string, error)
	Provided(http.ResponseWriter, *http.Request) (bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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