Documentation ¶
Overview ¶
Package auth handles the Realm GraphQL Server authentication. This consists of providing valid credentials to obtain a token. The token is refreshed every 30 minutes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { HTTPClient *http.Client Token *oauth2.Token // public so the application can use withExtra() to access device id or user_id // contains filtered or unexported fields }
Client holds a http realm client
func NewClient ¶
func NewClient(opts *options.ClientOptions) (*Client, error)
NewClient creates a new Client with endpoints to Realm based on the provided client options.
func (*Client) Connect ¶
Connect connects to realm and establishes http client with auto refresh Token
func (*Client) ConnectWithToken ¶
ConnectWithToken connect to realm with an existing token, either user-provided or internally obtained. Then token needs to be valid for the client to work.
Click to show internal directories.
Click to hide internal directories.