A swift implementation of OAuth2