Skip to content

Commit

Permalink
Modified the install.sh to make the withokta script slightly proxy-aw…
Browse files Browse the repository at this point in the history
…are.
  • Loading branch information
William Noad committed Aug 28, 2019
1 parent 9b5fc26 commit 04cc51b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ if [ "$3" == "logout" ]
then
command="logout"
fi
env OKTA_PROFILE=$profile java \
if [ -n "$https_proxy" ]; then
readonly URI_REGEX='^(([^:/?#]+):)?(//((([^:/?#]+)@)?([^:/?#]+)(:([0-9]+))?))?(/([^?#]*))(\?([^#]*))?(#(.*))?'
[[ $https_proxy =~ ${URI_REGEX} ]] && PROXY_CONFIG="-Dhttps.proxyHost=${BASH_REMATCH[7]} -Dhttps.proxyPort=${BASH_REMATCH[9]}"
fi
env OKTA_PROFILE=$profile java ${PROXY_CONFIG} \
-Djava.util.logging.config.file=~/.okta/logging.properties \
-classpath ~/.okta/okta-aws-cli.jar \
com.okta.tools.WithOkta $command "$@"
Expand Down

0 comments on commit 04cc51b

Please sign in to comment.