pub fn validate(hostname: &str, authorization_header: &str) -> boolExpand description
Validates a token from an authorization header against a hostname.
This function checks if a given authorization header contains a valid token for the specified hostname.
The token must be in the format “Bearer
§Arguments
hostname- A string slice containing the hostname to validate againstauthorization_header- A string slice containing the full authorization header value
§Returns
bool- Returns true if the token is valid for the hostname, false otherwise
§Examples
let hostname = "example.com";
let auth_header = "Bearer d41d8cd98f00b204e9800998ecf8427e";
let is_valid = edgee_sdk::token::validate(hostname, auth_header);