Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
kataras committed Feb 27, 2022
1 parent 6055bed commit 6a6b1cf
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# OAuth1

Modified to export some usefull methods in order to not re-create an http.Client instance
for each authorized user. Forked from [dghubble/oauth1)](https://github.com/dghubble/oauth1).
for each authorized user. Forked from [dghubble/oauth1](https://github.com/dghubble/oauth1).

## Install

```sh
$ go get github.com/iris-contrib/oauth1@latest
```

## Usage

```go
import "github.com/kataras/iris/v12/x/client"
```

```go
var myClient = client.New(client.BaseURL("https://apis.garmin.com"))
var myClient = client.New(client.BaseURL("https://xxx.xxx.com"))
```

```go
Expand All @@ -19,9 +27,9 @@ var config = &oauth1.Config{
ConsumerSecret: "xxx",
CallbackURL: "http://localhost:8080/callback",
Endpoint: oauth1.Endpoint{
RequestTokenURL: "https://connectapi.garmin.com/oauth-service/oauth/request_token",
AuthorizeURL: "https://connect.garmin.com/oauthConfirm",
AccessTokenURL: "https://connectapi.garmin.com/oauth-service/oauth/access_token",
RequestTokenURL: "https://xxx.xxx.com/oauth-service/oauth/request_token",
AuthorizeURL: "https://xxx.xxx.com/oauthConfirm",
AccessTokenURL: "https://xxx.xxx.com/oauth-service/oauth/access_token",
},
}
```
Expand Down

0 comments on commit 6a6b1cf

Please sign in to comment.