Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ credentials = Calendav::Credentials::Standard.new(
host: "https://www.example.com/caldav",
username: "example",
password: "secret",
authentication: :basic_auth # or :bearer_token
authentication: :basic_auth # :bearer_token and :oauth also supported
)
```

Expand Down
2 changes: 2 additions & 0 deletions lib/calendav/endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def authenticated
HTTP.basic_auth(user: credentials.username, pass: credentials.password)
when :bearer_token
HTTP.auth("Bearer #{credentials.password}")
when :oauth
HTTP.auth("OAuth #{credentials.password}")
else
raise "Unexpected authentication approach: " \
"#{credentials.authentication}"
Expand Down
Loading