Skip to content

Commit

Permalink
Move JWT extensions to its own package
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Sep 13, 2023
1 parent 54848b9 commit 59e48f8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
13 changes: 7 additions & 6 deletions source/BaselineOfStargate/BaselineOfStargate.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ BaselineOfStargate >> setUpCorePackages: spec [
group: 'Deployment' with: 'Stargate-Model'.

#( 'Stargate-Zinc-Extensions' 'Stargate-Teapot-Extensions'
'Stargate-NeoJSON-Extensions' ) do: [ :extensionPackageName |
spec
package: extensionPackageName
with: [ spec requires: 'Stargate-Model' ];
group: 'Core' with: extensionPackageName;
group: 'Deployment' with: extensionPackageName ]
'Stargate-NeoJSON-Extensions' 'Stargate-JSONWebToken-Extensions' )
do: [ :extensionPackageName |
spec
package: extensionPackageName
with: [ spec requires: 'Stargate-Model' ];
group: 'Core' with: extensionPackageName;
group: 'Deployment' with: extensionPackageName ]
]

{ #category : #baselines }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
Extension { #name : #JWTClaimsSet }

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-JSONWebToken-Extensions' }
JWTClaimsSet >> at: aKey ifAbsent: aBlock [

^ claims at: aKey ifAbsent: aBlock
]

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-JSONWebToken-Extensions' }
JWTClaimsSet >> permissions [

^ self at: 'permissions' ifAbsent: [ ^ #() ]
]

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-JSONWebToken-Extensions' }
JWTClaimsSet >> permissions: aCollection [

self at: 'permissions' put: aCollection asArray
]

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-JSONWebToken-Extensions' }
JWTClaimsSet >> scope [

^ self at: 'scope' ifAbsent: [ '' ]
]

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-JSONWebToken-Extensions' }
JWTClaimsSet >> scope: aString [

self at: 'scope' put: aString
Expand Down
1 change: 1 addition & 0 deletions source/Stargate-JSONWebToken-Extensions/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : #'Stargate-JSONWebToken-Extensions' }

0 comments on commit 59e48f8

Please sign in to comment.