You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're searching for making custom Oauth 2.0 server your search has finished here. This package helps you to develop your own custom oauth2 server. With lots of scaffolding done for you you can easily implement your own logic without any hassle.
4
+
Build your own Golang custom Oauth 2.0 server. This package helps you to develop your own custom oauth2 server. With lots of scaffolding done for you you can easily implement your own logic without any hassle.
5
5
<br>
6
6
Official docs: [Here](https://godoc.org/github.com/gobeam/goOauth2)
*[Clear All Access Token Of User](#clear-all-access-token-of-user)
13
16
*[Running the tests](#running-the-tests)
14
17
*[Contributing](#contributing)
15
18
*[License](#license)
@@ -23,7 +26,7 @@ This package uses <b>EncryptOAEP</b> which encrypts the given data with <b>RSA-O
23
26
24
27
25
28
## Example
26
-
For easy scaffold full working REST API example made with framework [gin-gonic/gin](https://github.com/gin-gonic/gin) is included in [example](https://github.com/gobeam/golang-oauth/tree/master/example) implementing this package.
29
+
For easy scaffold and full working REST API example made with framework [gin-gonic/gin](https://github.com/gin-gonic/gin) is included in [example](https://github.com/gobeam/golang-oauth/tree/master/example) implementing this package.
27
30
28
31
29
32
## Installation
@@ -68,98 +71,30 @@ To create client where 1 is user ID Which will return Oauth Clients struct which
where 1 is user ID Which will return Oauth Clients
96
-
struct which include client id and secret whic is
97
-
later used to validate client credentials */
98
-
store.CreateClient(userId int64)
74
+
## Create Access Token
75
+
Visit [oauthMiddleware.go](https://github.com/gobeam/golang-oauth/blob/master/example/middlewares/oauthMiddleware.go) to get full example on how to handle creating access token and refresh token.
99
76
100
77
78
+
## Revoke Access/Refresh Token manually
101
79
102
-
/* create access token alongside refresh token
103
-
Since it will not include user authentication
104
-
because it can be different for everyone you will
105
-
have to authenticate user and pass user id to Token struct.
106
-
Here you will authenticate user and get userID
107
-
you will have to provide all the field given below.
108
-
ClientID must be valid uuid. AccessExpiresIn is required
109
-
to mark expiration time. In response you will get TokenResponse
0 commit comments