pub fn skip_authorize() -> AuthorizationToken
Expand description

Skips the authorize() and returns AuthorizationToken, needed in functions with anonymous and test users

Example

async fn example_function(
    // No user mentioned
) -> ControllerResult<....> {
    // We need to return ControllerResult -> AuthorizedResponse

    let token = skip_authorize();

    token.authorized_ok(web::Json(organizations))

}