Documentation
¶
Index ¶
- type HTTPError
- type RPCError
- type Session
- func (s *Session) CaptureToken(serverURL string, headers http.Header) string
- func (s *Session) ChallengeHeaders(serverURL string, headers http.Header, method string, body []byte) (map[string]string, error)
- func (s *Session) ClearToken(serverURL string)
- func (s *Session) CurrentJWT() string
- func (s *Session) DoJSON(ctx context.Context, client *http.Client, method string, requestURL string, ...) error
- func (s *Session) DoJSONRPC(ctx context.Context, client *http.Client, requestURL string, method string, ...) error
- func (s *Session) EnsureJWT(ctx context.Context, client *http.Client, requestURL string) (string, error)
- func (s *Session) Headers(serverURL string, method string, body []byte, forceNew bool) (map[string]string, error)
- func (s *Session) RememberScope(serverURL string)
- func (s *Session) SetBearer(serverURL string, token string)
- func (s *Session) ShouldRetryAfter401(headers http.Header) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func (*Session) CaptureToken ¶
func (*Session) ChallengeHeaders ¶
func (*Session) ClearToken ¶
func (*Session) CurrentJWT ¶
func (*Session) RememberScope ¶
RememberScope marks a server scope as safe to persist bearer tokens returned by that scope. It is intentionally separate from SetBearer so first-time signed requests without an existing JWT can still store the token returned in Authentication-Info.
Click to show internal directories.
Click to hide internal directories.