# Akamai\Open\EdgeGrid\Authentication

#### Akamai {OPEN} EdgeGrid Request Signer

## Synopsis

class Authentication {

- // members
- protected $auth;
- protected $httpMethod;
- protected $host;
- protected array $config = ;
- protected $path;
- protected Timestamp $timestamp;
- protected Nonce $nonce;
- protected integer $max_body_size = 131072;
- protected array $headers_to_sign = ;

- // methods
- public string createAuthHeader()
- public Authentication setHttpMethod()
- public string getHost()
- public Authentication setHost()
- public Authentication setConfig()
- public $this setQuery()
- public void setBody()
- public $this setHeaders()
- public $this setPath()
- public void getPath()
- public $this setTimestamp()
- public $this setNonce()
- public $this setHeadersToSign()
- public $this setMaxBodySize()
- public $this setAuth()
- public static void createFromEdgeRcFile()
- protected string canonicalizeHeaders()
- protected string makeBase64HmacSha256()
- protected string makeBase64Sha256()
- protected string makeContentHash()
- protected string makeDataToSign()
- protected string makeSigningKey()
- protected string signRequest()
- protected static array parseEdgeRcFile()

}

## Coverage

Methods | 95.83% | 23 / 24
Lines | 99.27% | 136 / 137

## Members

#### protected

- $auth — array
- $config — array
- $headers_to_sign — array
- $host — string
- $httpMethod — string
- $max_body_size — int
- $nonce — Akamai\Open\EdgeGrid\Authentication\Nonce
- $path — string
- $timestamp — Akamai\Open\EdgeGrid\Authentication\Timestamp

## Methods

#### protected

- canonicalizeHeaders() — Returns headers in normalized form
- makeBase64HmacSha256() — Returns Base64 encoded HMAC-SHA256 Hash
- makeBase64Sha256() — Returns Base64 encoded SHA256 Hash
- makeContentHash() — Returns a hash of the HTTP POST body
- makeDataToSign() — Returns a string with all data that will be signed
- makeSigningKey() — Creates a signing key based on the secret and timestamp
- parseEdgeRcFile() — Parse a .edgerc File
- signRequest() — Returns a signature of the given request, timestamp and auth_header

#### public

- createAuthHeader() — Create the Authentication header
- createFromEdgeRcFile()
- getHost() — Get the request host
- getPath()
- setAuth() — Set Akamai EdgeGrid Authentication Tokens/Secret
- setBody() — Set request body
- setConfig() — Set Guzzle config
- setHeaders() — Set request headers
- setHeadersToSign() — Set headers to sign
- setHost() — Set request host
- setHttpMethod() — Set request HTTP method
- setMaxBodySize() — Set max body size to sign
- setNonce() — Set signing nonce
- setPath() — Set request path
- setQuery() — Set GET args
- setTimestamp() — Set signing timestamp