Documentation
¶
Index ¶
- func CreateAccessTokenRequest(host string, cid string, uid string, upw string, ressource string) (*http.Request, error)
- func CreateRefreshTokenRequest(host string, cid string, uid string, upw string, ressource string) (*http.Request, error)
- func ExtractToken(body []byte) (string, string, string, error)
- func GetTokenClaims(tokenString string) (jwt.MapClaims, error)
- func GetTokens(ressource string) (jwt.MapClaims, error)
- func RefreshToken(ressource string) error
- func SendAccessTokenRequest(req *http.Request) ([]byte, error)
- func SendRefreshTokenRequest(req *http.Request) ([]byte, error)
- func WriteTokensToConfig(token, refreshToken string, ressource string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAccessTokenRequest ¶
func CreateAccessTokenRequest(host string, cid string, uid string, upw string, ressource string) (*http.Request, error)
CreateAccessTokenRequest creates the http request to obtain an access token
func CreateRefreshTokenRequest ¶
func CreateRefreshTokenRequest(host string, cid string, uid string, upw string, ressource string) (*http.Request, error)
CreateRefreshTokenRequest creates the http request to obtain an refresh token
func ExtractToken ¶
ExtractToken extracts the access token and the refresh token from the http response body
func GetTokenClaims ¶
GetTokenClaims retrieves the claims from a token
func RefreshToken ¶
RefreshToken handles all stuff that is needed for refreshing the access token
func SendAccessTokenRequest ¶
SendAccessTokenRequest sends the access token request
func SendRefreshTokenRequest ¶
SendRefreshTokenRequest sends the refresh token request
func WriteTokensToConfig ¶
WriteTokensToConfig stores access token and refresh token in the config file for later usage
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.