Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
Request :
Request struct to build the required post parameters.
Fields:
[Required] UserId: the username that you want to submit access history for. [Required] IpAddress: ip address the user is connecting from that you wish to record the history of.
func (*Request) Post ¶
Post :
Executes a post to the access history endpoint.
Parameters:
[Required] r: should have all required fields of the struct populated before using. [Required] c: passing in the client containing authorization and host information.
Returns:
Response: Struct marshaled from the Json response from the API endpoints. Error: If an error is encountered, response will be nil and the error must be handled.
func (*Request) SetAccessHistory ¶
func (r *Request) SetAccessHistory(c *sa.Client, userID string, ipAddress string) (*Response, error)
SetAccessHistory :
Helper function for making Access History Posts
Parameters:
[Required] c: passing in the client containing authorization and host information. [Required] userId: the user you wish to submit the access history for. [Required] ipAddress: the ip address of the authentication you want to record.
Returns:
Response: Struct marshaled from the Json response from the API endpoints. Error: If an error is encountered, response will be nil and the error must be handled.
type Response ¶
type Response struct { Status string `json:"status,omitempty"` Message string `json:"message"` RawJSON string `json:"-"` HTTPResponse *http.Response `json:"-"` }
Response :
Response struct that will be populated after the post request.
func (*Response) IsSignatureValid ¶
IsSignatureValid :
Helper function to validate the SecureAuth Response signature in X-SA-SIGNATURE
Parameters:
[Required] r: response struct with HTTPResponse [Required] c: passing in the client with application id and key
Returns:
bool: if true, computed signature matches X-SA-SIGNATURE. if false, computed signature does not match. error: If an error is encountered, bool will be false and the error must be handled.
Click to show internal directories.
Click to hide internal directories.