summaryrefslogtreecommitdiff
path: root/INTERACT.md
diff options
context:
space:
mode:
Diffstat (limited to 'INTERACT.md')
-rw-r--r--INTERACT.md12
1 files changed, 10 insertions, 2 deletions
diff --git a/INTERACT.md b/INTERACT.md
index c36b238..0ead9fe 100644
--- a/INTERACT.md
+++ b/INTERACT.md
@@ -12,7 +12,7 @@ Try visiting protected page without authorization.
$ curl -L http://d2-03a.ipa.example.com:5000/protected -b ~/cookiejar.txt -c ~/cookiejar.txt
requires session
-Get kerberos ticket and then visit login url. This /login redirects to /login/kerberos by default.
+Get kerberos ticket and then visit kerberos login url.
$ kinit ${USER}
$ klist
@@ -23,7 +23,7 @@ Get kerberos ticket and then visit login url. This /login redirects to /login/ke
06/20/21 16:04:10 06/21/21 16:04:07 krbtgt/IPA.EXAMPLE.COM@IPA.EXAMPLE.COM
06/20/21 16:04:15 06/21/21 16:04:07 HTTP/d2-03a.ipa.example.com@IPA.EXAMPLE.COM
- $ curl -L http://d2-03a.ipa.example.com:5000/login --negotiate -u ':' -b ~/cookiejar.txt -c ~/cookiejar.txt
+ $ curl -L http://d2-03a.ipa.example.com:5000/login/kerberos --negotiate -u ':' -b ~/cookiejar.txt -c ~/cookiejar.txt
<meta http-equiv="Refresh" content="1; url=/protected/">success with kerberos
Visit protected page now that we have a session.
@@ -49,3 +49,11 @@ Visit protected page now that we have a session.
For submitting to the form, pass in form data using fields `username`, `password`, and optionally `logintype` which can be defined within the application. An included option is `ldap`. Kerberos auth through the form is not supported.
curl -L -X POST http://d2-03a:5000/login/ --data 'username=bgstack15&password=qwerty' -b ~/cookiejar.txt -c ~/cookiejar.txt
+
+Basic auth can be provided as a POST to /login/basic/.
+
+ $ curl -X POST -L http://d2-03a:5000/login/basic/ -b ~/cookiejar.txt -c ~/cookiejar.txt --user 'bgstack15'
+ Enter host password for user 'bgstack15':
+ <meta http-equiv="Refresh" content="1; url=/protected/">success with ldap
+ $ curl -X POST -L http://d2-03a:5000/login/basic/ -b ~/cookiejar.txt -c ~/cookiejar.txt --header "Authorization: Basic $( printf '%s' "${username}:${pw}" | base64 )"
+ <meta http-equiv="Refresh" content="1; url=/protected/">success with ldap
bgstack15