Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
support 'package:http' 1.0.0 (#149)
Browse files Browse the repository at this point in the history
* support 'package:http' 2.0.0

* update changelog

* update the CI SDK versions
  • Loading branch information
devoncarew authored May 30, 2023
1 parent dc22e6f commit f8cdafe
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
sdk: [2.17.0, dev]
sdk: [3.0.0, dev]
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest]
sdk: [2.17.0, dev]
sdk: [stable, beta]
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
Expand Down
47 changes: 25 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,86 @@
# 2.0.1
## 2.0.2

* Require Dart 3.0.
* Support `package:http` 1.0.0.

## 2.0.1

* Handle `expires_in` when encoded as string.
* Populate the pubspec `repository` field.
* Increase the minimum Dart SDK to `2.17.0`.

# 2.0.0
## 2.0.0

* Migrate to null safety.

# 1.6.3
## 1.6.3

* Added optional `codeVerifier` parameter to `AuthorizationCodeGrant` constructor.

# 1.6.1
## 1.6.1

* Added fix to make sure that credentials are only refreshed once when multiple calls are made.

# 1.6.0
## 1.6.0

* Added PKCE support to `AuthorizationCodeGrant`.

# 1.5.0
## 1.5.0

* Added support for `clientCredentialsGrant`.

# 1.4.0
## 1.4.0

* OpenID's id_token treated.

# 1.3.0
## 1.3.0

* Added `onCredentialsRefreshed` option when creating `Client` objects.

# 1.2.3
## 1.2.3

* Support the latest `package:http` release.

# 1.2.2
## 1.2.2

* Allow the stable 2.0 SDK.

# 1.2.1
## 1.2.1

* Updated SDK version to 2.0.0-dev.17.0

# 1.2.0
## 1.2.0

* Add a `getParameter()` parameter to `new AuthorizationCodeGrant()`, `new
Credentials()`, and `resourceOwnerPasswordGrant()`. This controls how the
authorization server's response is parsed for servers that don't provide the
standard JSON response.

# 1.1.1
## 1.1.1

* `resourceOwnerPasswordGrant()` now properly uses its HTTP client for requests
made by the OAuth2 client it returns.

# 1.1.0
## 1.1.0

* Add a `delimiter` parameter to `new AuthorizationCodeGrant()`, `new
Credentials()`, and `resourceOwnerPasswordGrant()`. This controls the
delimiter between scopes, which some authorization servers require to be
different values than the specified `' '`.

# 1.0.2
## 1.0.2

* Fix all strong-mode warnings.

* Support `crypto` 1.0.0.

* Support `http_parser` 3.0.0.

# 1.0.1
## 1.0.1

* Support `http_parser` 2.0.0.

# 1.0.0
## 1.0.0

## Breaking changes
### Breaking changes

* Requests that use client authentication, such as the
`AuthorizationCodeGrant`'s access token request and `Credentials`' refresh
Expand All @@ -98,7 +101,7 @@
* `new Credentials()` now takes named arguments rather than optional positional
arguments.

## Non-breaking changes
### Non-breaking changes

* Added a `resourceOwnerPasswordGrant` method.

Expand All @@ -116,7 +119,7 @@
* Since `http` 0.11.0 now works in non-`dart:io` contexts, `oauth2` does as
well.

# 0.9.2
## 0.9.2

* Expand the dependency on the HTTP package to include 0.10.x.

Expand Down
2 changes: 1 addition & 1 deletion lib/src/credentials.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class Credentials {
///
/// Throws a [FormatException] if the JSON is incorrectly formatted.
factory Credentials.fromJson(String json) {
void validate(bool condition, message) {
void validate(bool condition, String message) {
if (condition) return;
throw FormatException('Failed to load credentials: $message.\n\n$json');
}
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: oauth2
version: 2.0.1
version: 2.0.2
description: >-
A client library for authenticating with a remote service via OAuth2 on
behalf of a user, and making authorized HTTP requests with the user's
OAuth2 credentials.
repository: https://github.com/dart-lang/oauth2

environment:
sdk: '>=2.17.0 <3.0.0'
sdk: ^3.0.0

dependencies:
collection: ^1.15.0
crypto: ^3.0.0
http: ^0.13.0
http: '>=0.13.0 <2.0.0'
http_parser: ^4.0.0

dev_dependencies:
Expand Down

0 comments on commit f8cdafe

Please sign in to comment.