class basic_authorizer - 5cript/attender GitHub Wiki

class basic_authorizer

class basic_authorizer
  : public attender::authorizer_interface

Do note, that this class is also incomplete.

You have to provide your own user validation by deriving it.

Summary

Members Descriptions
public bool accept_authentication(std::string_view user,std::string_view password)
public virtual void negotiate_authorization_method(request_handler * req,response_handler * res) This function is only called if the client doesnt already attempt to authenticate properly.
public virtual authorization_result try_perform_authorization(request_handler * req,response_handler * res) Try to authenticate user with given request.

Members


public bool accept_authentication(std::string_view user,std::string_view password)


public virtual void negotiate_authorization_method(request_handler * req,response_handler * res)

This function is only called if the client doesnt already attempt to authenticate properly.

This function should respond with a WWW-Authenticate header response, so that the client knows what to do.


public virtual authorization_result try_perform_authorization(request_handler * req,response_handler * res)

Try to authenticate user with given request.