WPCF7_Service_OAuth2::get_http_authorization_header()protectedCF7 1.0

Метод класса: WPCF7_Service_OAuth2{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_http_authorization_header( $scheme );
$scheme **
-
По умолчанию: 'basic'

Код WPCF7_Service_OAuth2::get_http_authorization_header() CF7 5.9.3

protected function get_http_authorization_header( $scheme = 'basic' ) {
	$scheme = strtolower( trim( $scheme ) );

	switch ( $scheme ) {
		case 'bearer':
			return sprintf( 'Bearer %s', $this->access_token );
		case 'basic':
		default:
			return sprintf( 'Basic %s',
				base64_encode( $this->client_id . ':' . $this->client_secret )
			);
	}
}