#Expose AuthorizationManager as pub

4 messages · Page 1 of 1 (latest)

modern summit
#

Would it be possible for us to expose the AuthorizationManager outside of the Host crate?

Something I'm noticing is that I need to be able to snapshot the manager at a point, setup some mocks, then be able to revert back to the previous manager / setup.

If it was possible to get it, deep clone it, set it, that would be simple, but I note most types relating to auth appears to be pub(crate) in the host.

cc @woeful tundra

#

I'm going to open an issue about this actually, we don't need to figure this out now.

woeful tundra
#

I always err on the side of minimum viable visibility. if SDK needs it, we can make it public. the only thing to consider is that it needs to track the call stacks, so if the interface is something like test-only 'reset' that would be ok, but if the interface does something more intrusive, then it would make maintenance harder

modern summit
#

Agreed. I think we could probably find a way to export a "AuthSnapshot" that internally held a copy to the auth state, without having to make the actual types pub. That way the host can retain no visibility over these parts .