Skip to content
Snippets Groups Projects
Commit eb814e25 authored by OZGCloud's avatar OZGCloud
Browse files

pr anmerkung

parent 7857f315
Branches
Tags
No related merge requests found
......@@ -720,6 +720,14 @@ String getKeycloakUuid(realm, userName) {
}
}
String getKeycloakAccessToken(String realm) {
userManagerApiUserCredentials = getUserManagerApiUserCredentials(realm)
def token = readJSON text: sh (script: "set +x && curl -d \"client_id=admin-cli\" -d \"username=${userManagerApiUserCredentials.user}\" -d \"password=${userManagerApiUserCredentials.password}\" -d \"grant_type=password\" https://$SSO_URL/realms/$realm/protocol/openid-connect/token", returnStdout: true)
return token.access_token
}
Map getUserManagerApiUserCredentials(String namespace) {
userManagerApiUserCredentials = readJSON ( text: sh (script: "kubectl get secret usermanagerapiuser-credentials -n ${namespace} -o jsonpath={.data}", returnStdout: true))
......@@ -729,14 +737,6 @@ Map getUserManagerApiUserCredentials(String namespace) {
]
}
String getKeycloakAccessToken(String realm) {
userManagerApiUserCredentials = getUserManagerApiUserCredentials(realm)
def token = readJSON text: sh (script: "set +x && curl -d \"client_id=admin-cli\" -d \"username=${userManagerApiUserCredentials.user}\" -d \"password=${userManagerApiUserCredentials.password}\" -d \"grant_type=password\" https://$SSO_URL/realms/$realm/protocol/openid-connect/token", returnStdout: true)
return token.access_token
}
Void sendFailureMessage() {
def data = [
"msgtype": "m.text",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment