Skip to content

Commit

Permalink
add oauth properties
Browse files Browse the repository at this point in the history
  • Loading branch information
atomfrede committed Jun 10, 2020
1 parent 2eae9a8 commit a45bf3a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion generators/heroku/templates/application-heroku.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@
# https://docs.micronaut.io/latest/guide/configurationreference.html
# ===================================================================


<%_ if (useOkta) { _%>
micronaut:
security:
enabled: true
oauth2:
enabled: true
clients:
oidc:
client-secret: ${OKTA_OAUTH2_CLIENT_SECRET_WEB}
client-id: ${OKTA_OAUTH2_CLIENT_ID_WEB}
openid:
issuer: ${OKTA_OAUTH2_ISSUER}
<%_ } _%>

datasources:
default:
Expand Down
2 changes: 1 addition & 1 deletion generators/heroku/templates/provision-okta-addon.sh.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ get_apps() {
}

add_redirect_url() {
REDIRECT_URL="${1//\"/}login/oauth2/code/oidc"
REDIRECT_URL="${1//\"/}oauth2/callback/oidc"
jq '.settings.oauthClient.redirect_uris += ["'"${REDIRECT_URL}"'"]' app1.json >app1-mod.json
jq '.settings.oauthClient.redirect_uris += ["'"${REDIRECT_URL}"'"]' app2.json >app2-mod.json

Expand Down

0 comments on commit a45bf3a

Please sign in to comment.