Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Token ¶
Token represents the json structure that will be returned from the device after successfull authentication. The token can be used for further API calls and needs to be encoded in the 'authorization' field of the http header.
type TokenManager ¶
type TokenManager struct { Url string Username string Password string Connection *http.Client Token Token // contains filtered or unexported fields }
func (*TokenManager) CheckAuthToken ¶
func (m *TokenManager) CheckAuthToken() (isValid bool, err error)
CheckAuthToken checks if the tokenManager has valid authentication token.
func (*TokenManager) RequestAuthToken ¶
func (m *TokenManager) RequestAuthToken() (Token, error)
RequestAuthToken gets a valid authentication token from the ctrlX CORE using username and password. The token is necessary to create a subscription. An error will be returned, when no token could get aquired.
Click to show internal directories.
Click to hide internal directories.