code: def protected():
      
      custom_claims = flask_praetorian.current_custom_claims()
      firstname = custom_claims.pop('firstname', None)
      nickname = custom_claims.pop('nickname', None)
      surname = custom_claims.pop('surname', None)
  
      if nickname is None:
          user_string = "{} {}".format(firstname, surname)
      else:
          user_string = "{} '{}' {}".format(firstname, nickname, surname)
  
      return flask.jsonify(
          message="protected endpoint (allowed user {u})".format(u=user_string),
      )
docs: A protected endpoint. The auth_required decorator will require a header
      containing a valid JWT
  
      .. example::
         $ curl http://localhost:5000/protected -X GET \
           -H "Authorization: Bearer <your_token>"