Webhook::get_auth_header()

Summary

Returns the value of the auth header.


Return

(string|bool|null) The value, or false or null if filter_input fails.


Source

File: src/BigCommerce/Webhooks/Webhook.php

	public function get_auth_header() {
		// On some envs filter_input(https://bugs.php.net/bug.php?id=49184) may return NULL value even if variable exists
		// In order to prevent the issue we use filter_var for a $_SERVER variable
		return filter_var( $_SERVER[ self::INPUT_AUTH_HEADER ], FILTER_UNSAFE_RAW );
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.