Skip to content

Commit 8488482

Browse files
authored
Merge pull request #11 from coldbox-modules/development
2.0.0
2 parents fcefb96 + 7e1871f commit 8488482

33 files changed

Lines changed: 661 additions & 997 deletions

.bxlint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"exclude": [ "ModuleConfig.cfc" ]
3+
}

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
formatCheck:
2121
name: Checks Source Code Formatting
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-22.04
2323
steps:
2424
- name: Checkout Repository
2525
uses: actions/checkout@v3

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
##########################################################################################
2727
build:
2828
name: Build & Publish
29-
runs-on: ubuntu-20.04
29+
runs-on: ubuntu-22.04
3030
steps:
3131
- name: Checkout Repository
3232
uses: actions/checkout@v4
@@ -128,7 +128,7 @@ jobs:
128128
prep_next_release:
129129
name: Prep Next Release
130130
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
131-
runs-on: ubuntu-20.04
131+
runs-on: ubuntu-22.04
132132
needs: [ build ]
133133
steps:
134134
# Checkout development

.github/workflows/snapshot.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ jobs:
99
##########################################################################################
1010
# Module Tests
1111
##########################################################################################
12-
# tests:
13-
# secrets: inherit
14-
# uses: ./.github/workflows/tests.yml
12+
tests:
13+
secrets: inherit
14+
uses: ./.github/workflows/tests.yml
1515

1616
##########################################################################################
1717
# Format Source Code
1818
##########################################################################################
1919
format:
2020
name: Code Auto-Formatting
21-
runs-on: ubuntu-20.04
21+
runs-on: ubuntu-22.04
2222
steps:
2323
- uses: actions/checkout@v3
2424

.github/workflows/tests.yml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Test Suites
22

33
# We are a reusable Workflow only
44
on:
5+
workflow_dispatch:
56
workflow_call:
67
secrets:
78
SLACK_WEBHOOK_URL:
@@ -10,16 +11,16 @@ on:
1011
jobs:
1112
tests:
1213
name: Tests
13-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-22.04
1415
env:
1516
DB_USER: root
1617
DB_PASSWORD: root
1718
continue-on-error: ${{ matrix.experimental }}
1819
strategy:
1920
fail-fast: false
2021
matrix:
21-
cfengine: [ "lucee@5" ]
22-
coldboxVersion: [ "^6.0.0", "^7.0.0" ]
22+
cfengine: [ "lucee@5", "boxlang@1" ]
23+
coldboxVersion: [ "^7.0.0", "^8.0.0" ]
2324
experimental: [ false ]
2425
# Here we tests all engines against ColdBox@BE
2526
include:
@@ -45,41 +46,40 @@ jobs:
4546
distribution: "temurin"
4647
java-version: "11"
4748

49+
- name: Build Java Deps
50+
run: |
51+
cd java/cbsso-opensaml
52+
chmod +x ./gradlew
53+
./gradlew :app:build
54+
4855
- name: Setup CommandBox CLI
4956
uses: Ortus-Solutions/setup-commandbox@v2.0.1
5057

5158
# Not Needed in this module
52-
#- name: Setup Environment For Testing Process
53-
# run: |
54-
# # Setup .env
55-
# touch .env
56-
# # ENV
57-
# printf "DB_HOST=localhost\n" >> .env
58-
# printf "DB_DATABASE=mydatabase\n" >> .env
59-
# printf "DB_DRIVER=MySQL\n" >> .env
60-
# printf "DB_USER=${{ env.DB_USER }}\n" >> .env
61-
# printf "DB_PASSWORD=${{ env.DB_PASSWORD }}\n" >> .env
62-
# printf "DB_CLASS=com.mysql.cj.jdbc.Driver\n" >> .env
63-
# printf "DB_BUNDLEVERSION=8.0.19\n" >> .env
64-
# printf "DB_BUNDLENAME=com.mysql.cj\n" >> .env
65-
66-
- name: "Setup Environment Variables For Tests"
67-
id: current_version
59+
- name: Setup Environment For Testing Process
6860
run: |
69-
# master or snapshot
70-
echo "Github Ref is $GITHUB_REF"
71-
7261
# Setup .env
73-
touch ./test-harness/.env
74-
printf "GOOGLE_CLIENT_ID=new_google_id\n" >> ./test-harness/.env
75-
printf "GOOGLE_CLIENT_SECRET=google_secret\n" >> ./test-harness/.env
76-
printf "GITHUB_CLIENT_ID=test-value\n" >> ./test-harness/.env
77-
printf "GITHUB_CLIENT_SECRET=test-value\n" >> ./test-harness/.env
78-
printf "FACEBOOK_CLIENT_ID=test-value\n" >> ./test-harness/.env
79-
printf "FACEBOOK_CLIENT_SECRET=test-value\n" >> ./test-harness/.env
80-
printf "MS_ENTRA_CLIENT_ID=test-value\n" >> ./test-harness/.env
81-
printf "MS_ENTRA_CLIENT_SECRET=test-value\n" >> ./test-harness/.env
82-
printf "MS_ENTRA_SIGN_ON_ENDPOINT=test-value\n" >> ./test-harness/.env
62+
touch .env
63+
# ENV
64+
printf "DB_HOST=localhost\n" >> .env
65+
printf "GOOGLE_CLIENT_ID=test\n" >> .env
66+
printf "GOOGLE_CLIENT_SECRET=test\n" >> .env
67+
printf "GOOGLE_REDIRECT_URI=test\n" >> .env
68+
printf "GOOGLE_AUTH_ENDPOINT=test\n" >> .env
69+
printf "GOOGLE_ACCESS_TOKEN=test\n" >> .env
70+
printf "GITHUB_CLIENT_ID=test\n" >> .env
71+
printf "GITHUB_CLIENT_SECRET=test\n" >> .env
72+
printf "GITHUB_REDIRECT_URI=test\n" >> .env
73+
printf "GITHUB_AUTH_ENDPOINT=test\n" >> .env
74+
printf "GITHUB_ACCESS_TOKEN=test\n" >> .env
75+
printf "FACEBOOK_CLIENT_ID=test\n" >> .env
76+
printf "FACEBOOK_CLIENT_SECRET=test\n" >> .env
77+
printf "MS_ENTRA_REDIRECT_URI=test\n" >> .env
78+
printf "MS_ENTRA_CLIENT_ID=test\n" >> .env
79+
printf "MS_ENTRA_CLIENT_SECRET=test\n" >> .env
80+
printf "MS_ENTRA_SIGN_ON_ENDPOINT=test\n" >> .env
81+
printf "MS_ENTRA_FEDERATION_METADATA_URL=https://login.microsoftonline.com/2b263285-61e2-49c4-a257-8234f38486a2/federationmetadata/2007-06/federationmetadata.xml\n" >> .env
82+
printf "MS_ENTRA_ISSUER=test\n" >> .env
8383
8484
- name: Install Test Harness with ColdBox ${{ matrix.coldboxVersion }}
8585
run: |
@@ -91,7 +91,7 @@ jobs:
9191
- name: Start ${{ matrix.cfengine }} Server
9292
run: |
9393
box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug
94-
curl http://127.0.0.1:60299
94+
curl http://127.0.0.1:9181
9595
9696
- name: Run Tests
9797
run: |
@@ -108,7 +108,7 @@ jobs:
108108

109109
- name: Upload Test Results to Artifacts
110110
if: always()
111-
uses: actions/upload-artifact@v3
111+
uses: actions/upload-artifact@v4
112112
with:
113113
name: test-results-${{ matrix.cfengine }}-${{ matrix.coldboxVersion }}
114114
path: |
@@ -121,22 +121,22 @@ jobs:
121121
122122
- name: Upload Debug Logs To Artifacts
123123
if: ${{ failure() }}
124-
uses: actions/upload-artifact@v3
124+
uses: actions/upload-artifact@v4
125125
with:
126126
name: Failure Debugging Info - ${{ matrix.cfengine }} - ${{ matrix.coldboxVersion }}
127127
path: |
128128
.engine/**/logs/*
129129
.engine/**/WEB-INF/cfusion/logs/*
130130
131-
- name: Slack Notifications
132-
# Only on failures and NOT in pull requests
133-
if: ${{ failure() && !startsWith( 'pull_request', github.event_name ) }}
134-
uses: rtCamp/action-slack-notify@v2
135-
env:
136-
SLACK_CHANNEL: coding
137-
SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
138-
SLACK_ICON_EMOJI: ":bell:"
139-
SLACK_MESSAGE: '${{ github.repository }} tests failed :cry:'
140-
SLACK_TITLE: ${{ github.repository }} Tests For ${{ matrix.cfengine }} with ColdBox ${{ matrix.coldboxVersion }} failed
141-
SLACK_USERNAME: CI
142-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
131+
# - name: Slack Notifications
132+
# # Only on failures and NOT in pull requests
133+
# if: ${{ failure() && !startsWith( 'pull_request', github.event_name ) }}
134+
# uses: rtCamp/action-slack-notify@v2
135+
# env:
136+
# SLACK_CHANNEL: coding
137+
# SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'
138+
# SLACK_ICON_EMOJI: ":bell:"
139+
# SLACK_MESSAGE: '${{ github.repository }} tests failed :cry:'
140+
# SLACK_TITLE: ${{ github.repository }} Tests For ${{ matrix.cfengine }} with ColdBox ${{ matrix.coldboxVersion }} failed
141+
# SLACK_USERNAME: CI
142+
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
"directoryPath": "./test-harness/testbox",
1111
"isPhysicalDirectoryPath": false
1212
}
13-
]
13+
],
14+
"java.configuration.updateBuildConfiguration": "interactive"
1415
}

box.json

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"name": "cbsso",
3-
"version": "1.0.7",
4-
"location": "https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbsso/@build.version@/cbsso-@build.version@.zip",
5-
"author": "Ortus Solutions <info@ortussolutions.com>",
6-
"homepage": "https://github.com/coldbox-modules/cbsso",
7-
"documentation": "https://github.com/coldbox-modules/cbsso",
8-
"repository": {
9-
"type": "git",
10-
"url": "https://github.com/coldbox-modules/cbsso"
2+
"name":"cbsso",
3+
"version":"2.0.0",
4+
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbsso/@build.version@/cbsso-@build.version@.zip",
5+
"author":"Ortus Solutions <info@ortussolutions.com>",
6+
"homepage":"https://github.com/coldbox-modules/cbsso",
7+
"documentation":"https://github.com/coldbox-modules/cbsso",
8+
"repository":{
9+
"type":"git",
10+
"url":"https://github.com/coldbox-modules/cbsso"
1111
},
1212
"bugs": "https://github.com/coldbox-modules/cbsso",
1313
"shortDescription": "Description goes here",
@@ -20,16 +20,18 @@
2020
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
2121
}
2222
],
23-
"contributors": [ ],
24-
"dependencies": {
25-
"hyper": "^7.2.1",
26-
"jwt-cfml": "^1.2.0"
23+
"contributors":[],
24+
"dependencies":{
25+
"hyper":"^7.2.1",
26+
"jwt-cfml":"^1.2.0",
27+
"cbjavaloader":"^2.1.1+8"
2728
},
28-
"devDependencies": {
29-
"commandbox-cfformat": "*",
30-
"commandbox-docbox": "*",
31-
"commandbox-dotenv": "*",
32-
"commandbox-cfconfig": "*"
29+
"devDependencies":{
30+
"commandbox-cfformat":"*",
31+
"commandbox-docbox":"*",
32+
"commandbox-dotenv":"*",
33+
"commandbox-cfconfig":"*",
34+
"bx-esapi":"^1.6.0+9"
3335
},
3436
"ignore": [
3537
"**/.*",
@@ -55,12 +57,13 @@
5557
"logs:2018": "server log serverConfigFile=server-adobe@2018.json --follow",
5658
"logs:2021": "server log serverConfigFile=server-adobe@2021.json --follow"
5759
},
58-
"testbox": {
59-
"runner": "http://localhost:60299/tests/runner.cfm"
60+
"testbox":{
61+
"runner":"http://localhost:9181/tests/runner.cfm"
6062
},
61-
"installPaths": {
62-
"hyper": "modules/hyper/",
63-
"jwt-cfml": "modules/jwtcfml/",
64-
"cbjavaloader": "modules/cbjavaloader/"
63+
"installPaths":{
64+
"hyper":"modules/hyper/",
65+
"jwt-cfml":"modules/jwtcfml/",
66+
"cbjavaloader":"modules/cbjavaloader/",
67+
"bx-esapi":".engine/boxlang/WEB-INF/boxlang/modules/bx-esapi/"
6568
}
6669
}

build/Build.cfc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ component {
1212
variables.cwd = getCWD().reReplace( "\.$", "" );
1313
variables.artifactsDir = cwd & "/.artifacts";
1414
variables.buildDir = cwd & "/.tmp";
15-
variables.apiDocsURL = "http://localhost:60299/apidocs/";
16-
variables.testRunner = "http://localhost:60299/tests/runner.cfm";
15+
variables.apiDocsURL = "http://localhost:9181/apidocs/";
16+
variables.testRunner = "http://localhost:9181/tests/runner.cfm";
1717

1818
// Source Excludes Not Added to final binary
1919
variables.excludes = [

interceptors/cbAuth.cfc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ component {
66
var authService = getInstance( "authenticationService@cbauth" );
77
var userService = authService.getUserService();
88

9+
if( !data.ssoAuthorizationEvent.wasSuccessful() ){
10+
relocate( moduleSettings.errorRedirect );
11+
}
12+
913
var user = userService.findBySSO( data.ssoAuthorizationEvent, data.provider );
1014

1115
if( isNull( user ) ){

java/cbsso-opensaml/app/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ jar {
6060
shadowJar {
6161
archiveBaseName = "cbsso-opensaml"
6262
mergeServiceFiles()
63+
dependencies {
64+
exclude(dependency('org.apache.commons:commons-lang3'))
65+
}
6366
minimize{
6467
exclude( dependency( "org.opensaml:opensaml-core:.*" ) )
6568
exclude( dependency( "org.slf4j:.*:.*" ) )

0 commit comments

Comments
 (0)