def authorizeClientRequest(self, request):
token = '<STR_LIT>'<EOL>if self.serverType == '<STR_LIT>':<EOL><INDENT>token = self.getSocketServerToken(request)<EOL><DEDENT>elif self.serverType == '<STR_LIT:http>':<EOL><INDENT>token = self.getHttpServerToken(request)<EOL><DEDENT>if token != '<STR_LIT>' and token != None:<EOL><INDENT>if token in self.__tokens:<EOL><INDENT>if self.__tokens[token] == '<STR_LIT>':<EOL><INDENT>return True, ()<EOL><DEDENT>elif self.__tokens[token] == '<STR_LIT>':<EOL><INDENT>return False, (<NUM_LIT>, self.errorMessages[<NUM_LIT>], "<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return False, (<NUM_LIT>, self.errorMessages[<NUM_LIT>], "<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return False, (<NUM_LIT>, self.errorMessages[<NUM_LIT>], "<STR_LIT>")<EOL><DEDENT>
Checks the authorization permissions of the bearer token passed, and determines whether the sender is permitted to make the request housed in the payload.
Usage:
    request = The header object from pfioh, or the whole request from pman. This is parsed for the bearer token