Skip to content

Instantly share code, notes, and snippets.

@mskyttner
Created February 6, 2020 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mskyttner/6ce363430cf5336f17fa1f8f3114fd26 to your computer and use it in GitHub Desktop.
Save mskyttner/6ce363430cf5336f17fa1f8f3114fd26 to your computer and use it in GitHub Desktop.
Decode SAML message from .../saml/SSO
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