This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func loginPost(in *AuthParam, reqInfo RequestInfo) (*SignInResponse, error) { | |
keycloakURL := os.Getenv("KEYCLOAK_URL") + "auth/realms/" + os.Getenv("KEYCLOAK_REALM_NAME") + "/protocol/openid-connect/token" | |
clientToken := base64.StdEncoding.EncodeToString([]byte(os.Getenv("KEYCLOAK_ADMIN_CLIENT_SECRET"))) | |
form := url.Values{ | |
"grant_type": {"password"}, | |
"username": {in.Username}, | |
"password": {in.Password}, | |
"scope": {"openid"}, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
OlderNewer