-
-
Save mskyttner/6ce363430cf5336f17fa1f8f3114fd26 to your computer and use it in GitHub Desktop.
Decode SAML message from .../saml/SSO
This file contains 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
library(httr) | |
library(xml2) | |
library(magrittr) | |
library(base64enc) | |
library(clipr) | |
saml_decode <- function(url) { | |
content(GET(url)) %>% | |
xml_find_all("/html/body/form/div/input") %>% | |
xml_attr("value") %>% | |
base64decode() %>% | |
rawToChar() %>% | |
read_xml() %>% | |
as.character() | |
} | |
payload <- | |
"https://YOUR_HOSTNAME/saml/SSO" %>% | |
saml_decode() | |
cat(payload) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment