QueryAuth\Credentials\CredentialsInterface::getSecret PHP Method

getSecret() public method

Gets secret
public getSecret ( ) : string
return string Secret
    public function getSecret();

Usage Example

Example #1
0
 /**
  * Creates signature
  *
  * {@inheritDoc}
  */
 public function createSignature(RequestInterface $request, CredentialsInterface $credentials)
 {
     $data = $request->getMethod() . "\n" . $request->getHost() . "\n" . $this->getAbsolutePath($request->getPath()) . "\n" . $this->normalizeParameters($request->getParams());
     return \base64_encode(\hash_hmac('sha256', $data, $credentials->getSecret(), true));
 }
CredentialsInterface