original_docstring: Checks given token and returns a dict with actor id if valid.
          
docstring: Checks given token and returns a dict with actor id if valid.
docstring_tokens: Checks given token and returns a dict with actor id if valid .
code: def check_authentication_token(self, token_string=''):
          """Checks given token and returns a dict with actor id if valid.
          """
          token_id = "token_%s" % token_string
          token = self.container.object_store.read(token_id)
          if not isinstance(token, SecurityToken):
              raise Inconsistent("Token illegal type")
          if token.token_type != TokenTypeEnum.ACTOR_AUTH:
              raise BadRequest("Illegal token type")
          if token.token_string != token_string:
              raise Inconsistent("Found token's token_string does not match")
          cur_time = get_ion_ts_millis()
          if token.status != "OPEN":
              raise Unauthorized("Token status invalid")
          if cur_time >= int(token.expires):
              raise Unauthorized("Token expired")
  
          token_info = dict(actor_id=token.actor_id,
                      expiry=token.expires,
                      token=token,
                      token_id=token_id)
  
          log.info("Authentication token %s resolved to actor %s, expiry %s", token_string, token.actor_id, token.expires)
  
          return token_info
code_tokens: def check_authentication_token ( self , token_string = '' ) : token_id = "token_%s" % token_string token = self . container . object_store . read ( token_id ) if not isinstance ( token , SecurityToken ) : raise Inconsistent ( "Token illegal type" ) if token . token_type != TokenTypeEnum . ACTOR_AUTH : raise BadRequest ( "Illegal token type" ) if token . token_string != token_string : raise Inconsistent ( "Found token's token_string does not match" ) cur_time = get_ion_ts_millis ( ) if token . status != "OPEN" : raise Unauthorized ( "Token status invalid" ) if cur_time >= int ( token . expires ) : raise Unauthorized ( "Token expired" ) token_info = dict ( actor_id = token . actor_id , expiry = token . expires , token = token , token_id = token_id ) log . info ( "Authentication token %s resolved to actor %s, expiry %s" , token_string , token . actor_id , token . expires ) return token_info
short_docstring: Checks given token and returns a dict with actor id if valid.
short_docstring_tokens: Checks given token and returns a dict with actor id if valid .
comment: """Checks given token and returns a dict with actor id if valid.
          """