Documentation ¶
Index ¶
- Variables
- func IsCookieInvalidated(cookie string) bool
- func IsCookieValid(cookie string, requestCount int) bool
- func ParsePixelBazaVar(reader io.Reader) (int, error)
- func ParsePixelScriptURL(reader io.Reader) (string, string, error)
- func ParsePixelScriptVar(reader io.Reader) (string, error)
- func ParseScriptPath(reader io.Reader) (string, error)
- func ParseSecCpt(reader io.Reader) (int, string, error)
- type PixelInput
- type SensorInput
- type Session
Constants ¶
This section is empty.
Variables ¶
var ( ErrPixelBazaVarNotFound = errors.New("akamai-sdk-go: pixel Baza var not found") ErrPixelScriptNotFound = errors.New("akamai-sdk-go: script not found") ErrPixelScriptVarNotFound = errors.New("akamai-sdk-go: script var not found") )
var (
ErrScriptPathNotFound = errors.New("akamai-sdk-go: script path not found")
)
var (
ErrSecCpt = errors.New("akamai-sdk-go: error parsing sec-cpt page")
)
Functions ¶
func IsCookieInvalidated ¶
IsCookieInvalidated determines if the current session requires more sensors to be sent.
Protected endpoints can invalidate a session by setting a new _abck cookie that ends in '~0~-1~-1' or similar. This function returns if such an invalidated cookie is present, if it is present you should be able to make the cookie valid again with only 1 sensor post.
func IsCookieValid ¶
IsCookieValid determines if the provided _abck cookie value is valid, based on Akamai Bot Manager's client-side stop signal mechanism using the given request count. If the result is true, the client is ADVISED to halt further sensor data submissions. Submitting further would still produce a valid cookie but is unnecessary.
The stop signal mechanism in the Akamai Bot Manager's client-side script informs a client that the cookie received is valid and that any additional submissions are superfluous.
However, some applications do not activate the stop signal feature. In such scenarios, the client will continue submitting data whenever a trigger event occurs. Under these circumstances, verifying the authenticity of a cookie without sending it to a secured endpoint becomes challenging.
func ParsePixelBazaVar ¶
ParsePixelBazaVar gets the required pixel challenge variable "bazadebezolkohpepadr" from the given HTML code src.
func ParsePixelScriptURL ¶
ParsePixelScriptURL gets the script URL of the pixel challenge script and the URL to post a generated payload to from the given HTML code src.
func ParsePixelScriptVar ¶
ParsePixelScriptVar gets the dynamic value from the pixel script
func ParseScriptPath ¶
ParseScriptPath gets the Akamai Bot Manager web SDK path from the given HTML code src.
Types ¶
type PixelInput ¶
type SensorInput ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
NewSession creates a new Session that can be used to make requests to the FRIS Solutions API.
func (*Session) GeneratePixelData ¶
GeneratePixelData returns the pixel data using the FRIS Solutions API.
func (*Session) GenerateSensorData ¶
GenerateSensorData returns the sensor data required to generate valid akamai cookies using the FRIS Solutions API.