code: def identify(self, request):
          
          try:
              authorization = request.authorization
          except ValueError:
              return NO_IDENTITY
          if authorization is None:
              return NO_IDENTITY
          authtype, params = authorization
          auth = parse_basic_auth(authtype, params)
          if auth is None:
              return NO_IDENTITY
          return Identity(userid=auth.username, password=auth.password)
docs: Establish claimed identity using request.
  
          :param request: Request to extract identity information from.
          :type request: :class:`morepath.Request`.
          :return: :class:`morepath.Identity` instance.