Documentation ¶
Index ¶
- Constants
- Variables
- type PeerIDAuthHandshakeClient
- func (h *PeerIDAuthHandshakeClient) AddHeader(hdr http.Header)
- func (h *PeerIDAuthHandshakeClient) BearerToken() string
- func (h *PeerIDAuthHandshakeClient) HandshakeDone() bool
- func (h *PeerIDAuthHandshakeClient) ParseHeader(header http.Header) error
- func (h *PeerIDAuthHandshakeClient) PeerID() (peer.ID, error)
- func (h *PeerIDAuthHandshakeClient) Run() error
- func (h *PeerIDAuthHandshakeClient) ServerAuthenticated() bool
- func (h *PeerIDAuthHandshakeClient) SetInitiateChallenge()
- type PeerIDAuthHandshakeServer
Constants ¶
View Source
const PeerIDAuthScheme = "libp2p-PeerID"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type PeerIDAuthHandshakeClient ¶
type PeerIDAuthHandshakeClient struct { Hostname string PrivKey crypto.PrivKey // contains filtered or unexported fields }
func (*PeerIDAuthHandshakeClient) AddHeader ¶
func (h *PeerIDAuthHandshakeClient) AddHeader(hdr http.Header)
func (*PeerIDAuthHandshakeClient) BearerToken ¶
func (h *PeerIDAuthHandshakeClient) BearerToken() string
BearerToken returns the server given bearer token for the client. Set this on the Authorization header in the client's request.
func (*PeerIDAuthHandshakeClient) HandshakeDone ¶
func (h *PeerIDAuthHandshakeClient) HandshakeDone() bool
func (*PeerIDAuthHandshakeClient) ParseHeader ¶
func (h *PeerIDAuthHandshakeClient) ParseHeader(header http.Header) error
func (*PeerIDAuthHandshakeClient) PeerID ¶
func (h *PeerIDAuthHandshakeClient) PeerID() (peer.ID, error)
PeerID returns the peer ID of the authenticated client.
func (*PeerIDAuthHandshakeClient) Run ¶
func (h *PeerIDAuthHandshakeClient) Run() error
func (*PeerIDAuthHandshakeClient) ServerAuthenticated ¶
func (h *PeerIDAuthHandshakeClient) ServerAuthenticated() bool
func (*PeerIDAuthHandshakeClient) SetInitiateChallenge ¶
func (h *PeerIDAuthHandshakeClient) SetInitiateChallenge()
type PeerIDAuthHandshakeServer ¶
type PeerIDAuthHandshakeServer struct { Hostname string PrivKey crypto.PrivKey TokenTTL time.Duration // used to authenticate opaque blobs and tokens Hmac hash.Hash // contains filtered or unexported fields }
func (*PeerIDAuthHandshakeServer) ParseHeaderVal ¶
func (h *PeerIDAuthHandshakeServer) ParseHeaderVal(headerVal []byte) error
func (*PeerIDAuthHandshakeServer) PeerID ¶
func (h *PeerIDAuthHandshakeServer) PeerID() (peer.ID, error)
PeerID returns the peer ID of the authenticated client.
func (*PeerIDAuthHandshakeServer) Reset ¶
func (h *PeerIDAuthHandshakeServer) Reset()
func (*PeerIDAuthHandshakeServer) Run ¶
func (h *PeerIDAuthHandshakeServer) Run() error
func (*PeerIDAuthHandshakeServer) SetHeader ¶
func (h *PeerIDAuthHandshakeServer) SetHeader(hdr http.Header)
Click to show internal directories.
Click to hide internal directories.