i have create golang api with viper i can add oauth2 for the code following the next git repo https://github.com/go-oauth2/oauth2 but i need to reuse the access_token in the api
so when i run in the browser http://34.212.136.167:9096/token?grant_type=client_credentials&client_id=000000&client_secret=999999
the output is {"access_token":"BLYCHNALOMEZUG_MFNS8YW","expires_in":7200,"token_type":"Bearer"}
i need to use the access_token in the url like http://34.212.136.167:9096/api?token=access_token=BLYCHNALOMEZUG_MFNS8YW& <rest of api >
thanks
评论:
ramzy0x:
i need to make it like this https://go.hotlibs.com/github.com/go-oauth2/gin-server/package
this using gin-server , i need to use it in http.HandleFunc
