Skip to content

Commit 4da65ec

Browse files
committed
Merge branch 'development'
2 parents efaa754 + d62157d commit 4da65ec

19 files changed

+871
-663
lines changed

.cfformat.json

Lines changed: 58 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,60 @@
11
{
2-
"array.empty_padding" : false,
3-
"array.padding" : true,
4-
"array.multiline.min_length" : 40,
5-
"array.multiline.element_count" : 4,
6-
"array.multiline.leading_comma.padding" : true,
7-
"array.multiline.leading_comma" : false,
8-
"assignments.consecutive.alignment" : true,
9-
"brackets.padding" : true,
10-
"comment.asterisks" : "align",
11-
"binary_operators.padding" : true,
12-
"for_loop_semicolons.padding" : true,
13-
"function_call.empty_padding" : false,
14-
"function_call.padding" : true,
15-
"function_call.multiline.leading_comma.padding" : true,
16-
"function_call.casing.builtin" : "cfdocs",
17-
"function_call.casing.userdefined" : "",
18-
"function_call.multiline.element_count" : 4,
19-
"function_call.multiline.leading_comma" : false,
20-
"function_call.multiline.min_length" : 40,
21-
"function_declaration.padding" : true,
22-
"function_declaration.empty_padding" : false,
23-
"function_declaration.multiline.leading_comma" : false,
24-
"function_declaration.multiline.leading_comma.padding" : true,
25-
"function_declaration.multiline.element_count" : 4,
26-
"function_declaration.multiline.min_length" : 40,
27-
"function_declaration.group_to_block_spacing" : "compact",
28-
"function_anonymous.empty_padding" : false,
29-
"function_anonymous.group_to_block_spacing" : "compact",
30-
"function_anonymous.multiline.element_count" : 4,
31-
"function_anonymous.multiline.leading_comma" : false,
32-
"function_anonymous.multiline.leading_comma.padding" : true,
33-
"function_anonymous.multiline.min_length" : 40,
34-
"function_anonymous.padding" : true,
35-
"indent_size" : 4,
36-
"keywords.block_to_keyword_spacing" : "spaced",
37-
"keywords.group_to_block_spacing" : "spaced",
38-
"keywords.padding_inside_group" : true,
39-
"keywords.spacing_to_block" : "spaced",
40-
"keywords.spacing_to_group" : true,
41-
"keywords.empty_group_spacing" : false,
42-
"max_columns" : 120,
43-
"parentheses.padding" : true,
44-
"strings.quote" : "double",
45-
"strings.attributes.quote" : "double",
46-
"struct.separator" : " : ",
47-
"struct.padding" : true,
48-
"struct.empty_padding" : false,
49-
"struct.multiline.leading_comma" : false,
50-
"struct.multiline.leading_comma.padding" : true,
51-
"struct.multiline.element_count" : 4,
52-
"struct.multiline.min_length" : 40,
53-
"tab_indent" : true
2+
"array.empty_padding": false,
3+
"array.padding": true,
4+
"array.multiline.min_length": 40,
5+
"array.multiline.element_count": 2,
6+
"array.multiline.leading_comma.padding": true,
7+
"array.multiline.leading_comma": false,
8+
"alignment.consecutive.assignments": true,
9+
"alignment.consecutive.properties": true,
10+
"alignment.consecutive.params": true,
11+
"brackets.padding": true,
12+
"comment.asterisks": "align",
13+
"binary_operators.padding": true,
14+
"for_loop_semicolons.padding": true,
15+
"function_call.empty_padding": false,
16+
"function_call.padding": true,
17+
"function_call.multiline.leading_comma.padding": true,
18+
"function_call.casing.builtin": "cfdocs",
19+
"function_call.casing.userdefined": "camel",
20+
"function_call.multiline.element_count": 3,
21+
"function_call.multiline.leading_comma": false,
22+
"function_call.multiline.min_length": 40,
23+
"function_declaration.padding": true,
24+
"function_declaration.empty_padding": false,
25+
"function_declaration.multiline.leading_comma": false,
26+
"function_declaration.multiline.leading_comma.padding": true,
27+
"function_declaration.multiline.element_count": 3,
28+
"function_declaration.multiline.min_length": 40,
29+
"function_declaration.group_to_block_spacing": "compact",
30+
"function_anonymous.empty_padding": false,
31+
"function_anonymous.group_to_block_spacing": "compact",
32+
"function_anonymous.multiline.element_count": 3,
33+
"function_anonymous.multiline.leading_comma": false,
34+
"function_anonymous.multiline.leading_comma.padding": true,
35+
"function_anonymous.multiline.min_length": 40,
36+
"function_anonymous.padding": true,
37+
"indent_size": 4,
38+
"keywords.block_to_keyword_spacing": "spaced",
39+
"keywords.group_to_block_spacing": "spaced",
40+
"keywords.padding_inside_group": true,
41+
"keywords.spacing_to_block": "spaced",
42+
"keywords.spacing_to_group": true,
43+
"keywords.empty_group_spacing": false,
44+
"max_columns": 120,
45+
"metadata.multiline.element_count": 3,
46+
"metadata.multiline.min_length": 40,
47+
"property.multiline.element_count": 3,
48+
"property.multiline.min_length": 40,
49+
"parentheses.padding": true,
50+
"strings.quote": "double",
51+
"strings.attributes.quote": "double",
52+
"struct.separator": " : ",
53+
"struct.padding": true,
54+
"struct.empty_padding": false,
55+
"struct.multiline.leading_comma": false,
56+
"struct.multiline.leading_comma.padding": true,
57+
"struct.multiline.element_count": 2,
58+
"struct.multiline.min_length": 40,
59+
"tab_indent": true
5460
}

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ before_script:
4242
- mysql -u root < test-harness/tests/resources/cbsecurity.sql
4343
- echo "Database created and loaded with test data"
4444
# Seed .env
45-
- echo "Seeding database .env file at /test-harness/.env"
45+
- echo "Seeding .env file at /test-harness/.env"
4646
- touch test-harness/.env
4747
- printf "DB_HOST=localhost\n" >> test-harness/.env
4848
- printf "DB_DATABASE=cbsecurity\n" >> test-harness/.env

ModuleConfig.cfc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ component {
1919
// Helpers
2020
this.applicationHelper = [ "helpers/mixins.cfm" ];
2121
// Dependencies
22-
this.dependencies = [ "cbauth", "jwt" ];
22+
this.dependencies = [ "cbauth", "jwtcfml" ];
2323

2424
/**
2525
* Module Config
@@ -69,6 +69,8 @@ component {
6969
"enableSecurityVisualizer" : false,
7070
// JWT Settings
7171
"jwt" : {
72+
// The issuer authority for the tokens, placed in the `iss` claim
73+
"issuer" : "",
7274
// The jwt secret encoding key to use
7375
"secretKey" : getSystemSetting( "JWT_SECRET", "" ),
7476
// by default it uses the authorization bearer header, but you can also pass a custom one as well or as an rc variable.

box.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"ColdBox Security",
3-
"version":"2.1.0",
3+
"version":"2.2.0",
44
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbsecurity/@build.version@/[email protected]@.zip",
55
"author":"Ortus Solutions.com <[email protected]",
66
"slug":"cbsecurity",
@@ -28,13 +28,13 @@
2828
"*/.md"
2929
],
3030
"dependencies":{
31-
"jwt":"^1.1.0",
31+
"jwt-cfml":"^1.0.0",
3232
"cbauth":"^4.0.0"
3333
},
3434
"scripts":{
3535
"toMaster":"recipe build/toMaster.boxr",
36-
"format":"cfformat handlers/**.cfc,interceptors/**.cfc,models/**.cfc --overwrite",
37-
"format:watch":"cfformat handlers/**.cfc,interceptors/**.cfc,models/**.cfc --watch",
38-
"format:check":"cfformat handlers/**.cfc,interceptors/**.cfc,models/**.cfc --check"
36+
"format":"cfformat run handlers/**.cfc,interceptors/**.cfc,models/**.cfc --overwrite",
37+
"format:watch":"cfformat run handlers/**.cfc,interceptors/**.cfc,models/**.cfc --watch",
38+
"format:check":"cfformat run handlers/**.cfc,interceptors/**.cfc,models/**.cfc --check"
3939
}
4040
}

build/toMaster.boxr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Check out master
44
!git checkout -f master
5+
!git pull
56
# Merge development into it
67
!git merge --no-ff development
78
# Tag the master repo with the version in box.json

changelog.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# CHANGELOG
22

3+
## 2.2.0
4+
5+
* `Feature` : Migrated from the jwt to the `jwtcfml` (https://forgebox.io/view/jwt-cfml) library to expand encoding/decoding capabilities to support `RS` and `ES` algorithms:
6+
* HS256
7+
* HS384
8+
* HS512
9+
* RS256
10+
* RS384
11+
* RS512
12+
* ES256
13+
* ES384
14+
* ES512
15+
* `Feature` : Added a new convenience method on the JWT Service: `isTokenInStorage( token )` to verify if a token still exists in the token storage
16+
* `Feature` : If no jwt secret is given in the settings, we will dynamically generate one that will last for the duration of the application scope.
17+
* `Feature` : New setting for `jwt` struct: `issuer`, you can now set the issuer of tokens string or if not set, then cbSecurity will use the home page URI as the issuer of authority string.
18+
* `Feature` : All tokens will be validated that the same `iss` (Issuer) has granted the token
19+
* `Improve` : Ability to have defaults for all JWT settings instead of always typing them in the configs
20+
* `Improve` : More cfformating goodness!
21+
* `Bug` : Invalidation of tokens was not happening due to not using the actual key for the storage
22+
323
## 2.1.0
424

525
* `Feature` : cbauth upgraded to version 4

0 commit comments

Comments
 (0)