Skip to content

Add OAuth bearer-token authentication support - #305

Merged
pcai merged 1 commit into
mainfrom
pr-295-oauth-rebase
Sep 15, 2026
Merged

pcai merged 1 commit into
mainfrom
pr-295-oauth-rebase

Conversation

@pcai

@pcai pcai commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

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.

Update specs for the new signature, add OAuth header specs, and refresh the README setup docs.

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
pcai force-pushed the pr-295-oauth-rebase branch from a3aba30 to 57b6c42 Compare September 15, 2026 15:45
@pcai
pcai merged commit 1756bb5 into main Sep 15, 2026
15 checks passed
@pcai
pcai deleted the pr-295-oauth-rebase branch September 15, 2026 15:47
@pcai pcai mentioned this pull request 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.

1 participant