Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DisplayClaims ¶
type DisplayClaims struct {
GamerTag string `json:"gtg"`
XUID string `json:"xid"`
UserHash string `json:"uhs"`
}
DisplayClaims contains an information for user of Token.
type Token ¶
type Token interface {
// SetAuthHeader sets an 'Authorization' and a 'Signature' header in the request.
SetAuthHeader(req *http.Request)
// String formats the Token into a string that can be set as an 'Authorization' header
// or a field in requests. It usually follows the format 'XBL3.0 x=<user hash>;<token>'.
String() string
// DisplayClaims returns the DisplayClaims, which contains an information for a user.
// It is usually claimed from the response body returned from the authorization.
DisplayClaims() DisplayClaims
}
type TokenSource ¶
TokenSource implements a Token method that returns a Token.
type Transport ¶
type Transport struct {
Source TokenSource
Base http.RoundTripper
}
Transport is an http.RoundTripper that makes authenticated Xbox Live requests, wrapping a base RoundTripper and adding an 'Authorization' header and a 'Signature' header with a token from the supplied Sources.
Click to show internal directories.
Click to hide internal directories.