Documentation
¶
Overview ¶
Package scramsha provides implementation of client side SCRAM-SHA according to https://tools.ietf.org/html/rfc5802
Package scramsha provides implementation of client side SCRAM-SHA via Http according to https://tools.ietf.org/html/rfc7804
Index ¶
Constants ¶
const ( WWWAuthenticate = "WWW-Authenticate" AuthenticationInfo = "Authentication-Info" Authorization = "Authorization" DataPrefix = "data=" SidPrefix = "sid=" )
consts used to parse scramsha response from target
Variables ¶
This section is empty.
Functions ¶
func BestMethod ¶
BestMethod returns SCRAM-SHA method we consider the best out of suggested by server
Types ¶
type Request ¶
type Request struct { // Embed an HTTP request directly. This makes a *Request act exactly // like an *http.Request so that all meta methods are supported. *http.Request // contains filtered or unexported fields }
Request provides implementation of http request that can be retried
func NewRequest ¶
func NewRequest(method, url string, body io.ReadSeeker) (*Request, error)
NewRequest creates http request that can be retried
type ScramSha ¶
type ScramSha struct {
// contains filtered or unexported fields
}
ScramSha provides context for SCRAM-SHA handling
func NewScramSha ¶
NewScramSha creates context for SCRAM-SHA handling
func (*ScramSha) GetFinalRequest ¶
GetFinalRequest builds final SCRAM-SHA request to be sent to server
func (*ScramSha) GetStartRequest ¶
GetStartRequest builds start SCRAM-SHA request to be sent to server
func (*ScramSha) HandleFinalResponse ¶
HandleFinalResponse handles server's response on final SCRAM-SHA request
func (*ScramSha) HandleStartResponse ¶
HandleStartResponse handles server response on start SCRAM-SHA request