You don't seem to use the expiration time here, but you use it above. Also, consider creating a separate method that reads the data from the broker and creates an auth result.