Skip to content

Commit d4aca9e

Browse files
committed
Readme
1 parent 172e514 commit d4aca9e

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

README.md

+18-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Laravel HTTP Client Auth helper
1+
# Laravel HTTP Client Auth helper 🤝
22

33
An easy-to-use helper for Laravel HTTP Client to make manage API requests with a two-step auth flow.
44
For example, OAuth2 or refresh tokens to get a new short-lived access token.\
@@ -16,22 +16,27 @@ This helper takes care of all the headaches and boilerplate code with a simple a
1616
I want to support as many common auth flows as possible.\
1717
If you have a use case that is not super obscure,
1818
please [open an issue](https://github.com/pelmered/laravel-http-client-auth-helper/issues/new) where you provide as much detail as possible,
19-
or [submit a PR](https://github.com/pelmered/laravel-http-client-auth-helper/pulls).
19+
or [submit a PR](https://github.com/pelmered/laravel-http-client-auth-helper/pulls) with a working solution.
2020

2121
#### Note: the API is not yet stable and the documentation is in the process of being updated. I hope I can release a version 1 soon.
2222

2323
#### TODO before stable 1.0.0 version:
24-
- Define a stable API
25-
- Set good defaults
26-
- Auth type: Basic or bearer?
27-
- Expires option
28-
- Credential token key
29-
- Access token key
24+
- ~~Define a stable API~~
25+
- ~~Set good defaults~~
26+
- ~~Auth type: Basic or bearer?~~
27+
- ~~Expires option~~
28+
- ~~Credential token key~~
29+
- ~~Access token key~~
3030
- ~~Improve data validation and error messages~~
31-
- Write/update readme
31+
- ~~Write/update readme~~
3232
- ~~Make the cache store configurable~~
33-
- Maybe: add more tests
34-
- Maybe: Add support for authorization_code and implicit grants
33+
- ~~Maybe: add more tests~~
34+
- ~~Maybe: Add support for authorization_code and implicit grants~~ → target for version 1.1
35+
36+
##### Plans for 1.1
37+
38+
- Automatically refresh tokens in the background before they expire.
39+
- Add support for authorization_code and implicit OAuth2 grants.
3540

3641
[![Latest Stable Version](https://poser.pugx.org/pelmered/laravel-http-client-auth-helper/v/stable)](https://packagist.org/packages/pelmered/laravel-http-client-auth-helper)
3742
[![Total Downloads](https://poser.pugx.org/pelmered/laravel-http-client-auth-helper/d/total)](//packagist.org/packages/pelmered/laravel-http-client-auth-helper)
@@ -46,6 +51,7 @@ or [submit a PR](https://github.com/pelmered/laravel-http-client-auth-helper/pul
4651
[![Tested on PHP 8.1 to 8.4](https://img.shields.io/badge/Tested%20on%20PHP-8.1%20|%208.2%20|%208.3%20|%208.4-brightgreen.svg?maxAge=2419200)](https://github.com/pelmered/filament-money-field/actions/workflows/tests.yml)
4752
[![Tested on OS:es Linux, MacOS, Windows](https://img.shields.io/badge/Tested%20on%20lastest%20versions%20of-%20Ubuntu%20|%20MacOS%20|%20Windows-brightgreen.svg?maxAge=2419200)](https://github.com/pelmered/laravel-http-client-auth-helper/actions/workflows/tests.yml)
4853

54+
## Table of contents
4955
<!-- toc -->
5056

5157
- [Requirements](#requirements)
@@ -136,7 +142,7 @@ integer - for how long until expiry in seconds)\
136142
string - Can be key of the field in response that contains the expiry of the token. Can also be a string with a date. This is then parsed by Carbon::parse so any format that Carbon can parse is acceptable.\
137143
Closure - A closure that receives the refresh response and can return any other acceptable value (integer, string or Carbon object).\
138144
Carbon - A Carbon object with the time of the expiry.\
139-
**Default:** 3600
145+
**Default:** `3600`
140146

141147
### accessToken - `string|Closure`
142148
This is where the access token can be found on the refresh response.\

0 commit comments

Comments
 (0)