Documentation
¶
Overview ¶
Package http implements FDO transport interfaces using an HTTP protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizationJar ¶
type AuthorizationJar interface { Clear(context.Context, protocol.Protocol) GetToken(context.Context, protocol.Protocol) string StoreToken(context.Context, protocol.Protocol, string) }
AuthorizationJar stores authorization tokens. Context parameters are used to allow passing arbitrary data which may be needed for thread-safe implementations.
type Handler ¶
type Handler struct { Tokens protocol.TokenService DIResponder protocol.Responder TO0Responder protocol.Responder TO1Responder protocol.Responder TO2Responder protocol.Responder // MaxContentLength defaults to 65535. Negative values disable content // length checking. MaxContentLength int64 }
Handler implements http.Handler and responds to all DI, TO1, and TO2 message types. It is expected that the request will use the POST method and the path will be of the form "/fdo/$VER/msg/$MSG".
type Transport ¶
type Transport struct { // The http/https URL, potentially including a path prefix, but without // /fdo/101/msg. BaseURL string // Client to use for HTTP requests. Nil indicates that the default client // should be used. Client *http.Client // Auth stores Authorization headers much like a CookieJar in a standard // *http.Client stores cookie headers. As specified in Section 4.3, each // protocol (TO1, TO2, etc.) generally starts with a message containing no // Authorization header and the server responds with one. This header, like // a cookie, is used for tracking protocol state on the server side. // // If no jar is set, then a default jar will be used. The default jar // stores tokens based on DI/TO1/TO2 protocol classification of the request // message type. Auth AuthorizationJar // MaxContentLength defaults to 65535. Negative values disable content // length checking. MaxContentLength int64 }
Transport implements FDO message sending capabilities over HTTP. Send may be used for sending one message and receiving one response message.
Click to show internal directories.
Click to hide internal directories.