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

OZG-2904 removed /auth from sso path

parent 3a34dfe9
No related branches found
No related tags found
No related merge requests found
...@@ -585,7 +585,7 @@ String generateCypressConfig(String stage, String bezeichner, String testFolder) ...@@ -585,7 +585,7 @@ String generateCypressConfig(String stage, String bezeichner, String testFolder)
String getKeycloakUuid(realm, userName) { String getKeycloakUuid(realm, userName) {
def shScript = """curl -H 'Content-Type: application/json' \ def shScript = """curl -H 'Content-Type: application/json' \
-H 'Authorization: bearer ${getKeycloakAccessToken()}' \ -H 'Authorization: bearer ${getKeycloakAccessToken()}' \
'https://sso.dev.ozg-sh.de/auth/admin/realms/${realm}/users' 'https://sso.dev.ozg-sh.de/admin/realms/${realm}/users'
""" """
def users = readJSON text: sh(script: shScript, returnStdout: true) def users = readJSON text: sh(script: shScript, returnStdout: true)
...@@ -599,7 +599,7 @@ String getKeycloakUuid(realm, userName) { ...@@ -599,7 +599,7 @@ String getKeycloakUuid(realm, userName) {
String getKeycloakAccessToken() { String getKeycloakAccessToken() {
withCredentials([usernamePassword(credentialsId: 'keycloak-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { withCredentials([usernamePassword(credentialsId: 'keycloak-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
def token = readJSON text: sh (script: 'curl -d "client_id=admin-cli" -d "username=$USER" -d "password=$PASSWORD" -d "grant_type=password" "https://sso.dev.ozg-sh.de/auth/realms/master/protocol/openid-connect/token"', returnStdout: true) def token = readJSON text: sh (script: 'curl -d "client_id=admin-cli" -d "username=$USER" -d "password=$PASSWORD" -d "grant_type=password" "https://sso.dev.ozg-sh.de/realms/master/protocol/openid-connect/token"', returnStdout: true)
return token.access_token return token.access_token
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment