remove current-subject from OpenAPI header specs, use Authorization instead (#164)
Co-authored-by: Michael Hoennig <michael@hoennig.de> Reviewed-on: https://dev.hostsharing.net/hostsharing/hs.hsadmin.ng/pulls/164 Reviewed-by: Timotheus Pokorra <timotheus.pokorra@hostsharing.net>
This commit is contained in:
12
bin/cas-curl
12
bin/cas-curl
@ -131,6 +131,15 @@ function casTicket() {
|
||||
echo $HSADMINNG_CAS_TICKET
|
||||
}
|
||||
|
||||
function casTgt() {
|
||||
HSADMINNG_CAS_TGT=$(<~/.cas-login-tgt)
|
||||
if [[ -z "$HSADMINNG_CAS_TGT" ]]; then
|
||||
echo "ERROR: cannot get CAS ticket granting ticket for $HSADMINNG_CAS_USERNAME" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "CAS-TGT: $HSADMINNG_CAS_TGT"
|
||||
}
|
||||
|
||||
function casValidate() {
|
||||
HSADMINNG_CAS_TICKET=`casTicket`
|
||||
|
||||
@ -191,6 +200,9 @@ case "${1,,}" in
|
||||
"unassume") ## do not assume any particular role anymore, use the plain user as RBAC subject
|
||||
rm ~/.cas-curl-assume
|
||||
;;
|
||||
"tgt") ## prints the current ticket granting ticket
|
||||
casTgt
|
||||
;;
|
||||
"validate") ## validates current ticket granting ticket and prints currently logged in user
|
||||
casValidate
|
||||
;;
|
||||
|
Reference in New Issue
Block a user