Skip to content

oauth support by @fliebe92 - #295

Closed
pcai wants to merge 1 commit into
mainfrom
oauth
Closed

pcai wants to merge 1 commit into
mainfrom
oauth

Conversation

@pcai

@pcai pcai commented Jul 13, 2024

Copy link
Copy Markdown
Contributor

closes #287

pcai added a commit that referenced this pull request Sep 15, 2026
Reimplement #295 (oauth support by @fliebe92), which had
gone conflicted with main.

EWSClient.new and Viewpoint::EWS::Connection.new now take an auth hash
(endpoint:, type:, user:, password:, token:) instead of positional
endpoint, username, password arguments. With type: 'oauth' and a token:,
requests carry an Authorization: Bearer header and the basic-auth
set_auth handshake is skipped; with type: 'basic' behavior is unchanged.

Also fixes a latent bug in the original PR: it called
@auth_token.present?, which requires ActiveSupport. The token check is
now plain Ruby.

Update specs for the new signature, add OAuth header specs, and refresh
the README setup docs.
pcai added a commit that referenced this pull request Sep 15, 2026
Reimplements #295 (oauth support by @fliebe92), which had gone conflicted with main.

EWSClient.new and Viewpoint::EWS::Connection.new now take an auth hash (endpoint:, type:, user:, password:, token:) instead of positional endpoint, username, password arguments. With type: 'oauth' and a token:, requests carry an Authorization: Bearer header and the basic-auth set_auth handshake is skipped; with type: 'basic' behavior is unchanged.

Also fixes a latent bug in the original PR: it called @auth_token.present?, which requires ActiveSupport. The token check is now plain Ruby.
@pcai

pcai commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #305, which reimplements this on current main.

@pcai

pcai commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

@fliebe92 thank you

@pcai pcai closed this Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Basic authentication is deprecated

1 participant