An API for authorization