I'm working with authentication and I require multiple authentication domains, as there is little/no overlap between the users that are allowed to access different portions of the system. Since the built in authorization functions use the option AUTH_REALM directly, I've gotten around this by using mg_set_option whenever I need to authorize, as the allocations every time the domain changes seem less impact than replicating the existing logic in my MG_REQUEST handler.
In any case, I can't see any direct way to determine from an mg_connection which mg_server instance is serving it (I'm using multiple threads). The nearest I can get is to assign a unique value to server_param as each server instance is created and then do a lookup to see what server was associated with it. It would be a bit easier if there was a way to modify the server_param after the server was created, so that I could set it to the server itself. Is there a better/easier way to pull this off? I would think that it's safe to access the mg_server from it's own event handler since that's the thread it's running in, but the API doesn't provide any functionality like this on it's own so I'm not sure if maybe there is some reason I'm not thinking of that it doesn't exist. -- You received this message because you are subscribed to the Google Groups "mongoose-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mongoose-users. For more options, visit https://groups.google.com/d/optout.
