A Golang implementation for Oauth 2.0 + OIDC mechanism with clean architechture approach.
From the book OAuth 2.0 in Action
OAuth 2.0 is a delegation protocol, a means of letting someone who controls a resource allow a software application to access that resource on their behalf without impersonating them.
The application requests authorization from the owner of the resource and receives tokens that it can use to access the resource.
We can think of the OAuth token as a “valet key” for the web. Simple valet keys limit the valet to accessing the ignition and doors but not the trunk or glove box.
OAuth tokens can limit the client’s access to only the actions that the resource owner has delegated.
From RFC 6749
The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf.
- The resource owner
- The protected resource
- The client
- The authorization server
make all
docker build -t zeihanaulia/oauth2:0.1 .
docker run \
--rm \
--name otpsvc \
-p8080-8083:8080-8083 \
zeihanaulia/oauth2:0.1