Documentation
¶
Overview ¶
Package tokenclient creates the OAuth client through which one personal API token is minted. Its wire members are named after RFC 7591 §2 and RFC 7591 §3.2.1; the shared bearer stands in for the initial access token. The backend fixes the other client properties, including a 30-day access token lifetime. This is not an RFC 7591 registration endpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalid = errors.New("token client invalid") )
Functions ¶
Types ¶
type Backend ¶
type Backend interface {
Create(context.Context, Request) (Credentials, error)
}
Backend creates a client for one personal token. Create is not idempotent: every successful call creates a new client.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client calls Handler from Holon's side.
type Credentials ¶
type Credentials struct {
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
}
Credentials identify the created client and contain its secret.