From 59e48f840cebec2b94732dbc23f88a726b3d480a Mon Sep 17 00:00:00 2001 From: Gabriel Omar Cotelli Date: Wed, 13 Sep 2023 14:40:23 -0300 Subject: [PATCH] Move JWT extensions to its own package --- .../BaselineOfStargate/BaselineOfStargate.class.st | 13 +++++++------ .../JWTClaimsSet.extension.st | 10 +++++----- source/Stargate-JSONWebToken-Extensions/package.st | 1 + 3 files changed, 13 insertions(+), 11 deletions(-) rename source/{Stargate-Model => Stargate-JSONWebToken-Extensions}/JWTClaimsSet.extension.st (61%) create mode 100644 source/Stargate-JSONWebToken-Extensions/package.st diff --git a/source/BaselineOfStargate/BaselineOfStargate.class.st b/source/BaselineOfStargate/BaselineOfStargate.class.st index 37183cc..0127b9a 100644 --- a/source/BaselineOfStargate/BaselineOfStargate.class.st +++ b/source/BaselineOfStargate/BaselineOfStargate.class.st @@ -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 } diff --git a/source/Stargate-Model/JWTClaimsSet.extension.st b/source/Stargate-JSONWebToken-Extensions/JWTClaimsSet.extension.st similarity index 61% rename from source/Stargate-Model/JWTClaimsSet.extension.st rename to source/Stargate-JSONWebToken-Extensions/JWTClaimsSet.extension.st index 99cc964..a2aa8ee 100644 --- a/source/Stargate-Model/JWTClaimsSet.extension.st +++ b/source/Stargate-JSONWebToken-Extensions/JWTClaimsSet.extension.st @@ -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 diff --git a/source/Stargate-JSONWebToken-Extensions/package.st b/source/Stargate-JSONWebToken-Extensions/package.st new file mode 100644 index 0000000..4cda57a --- /dev/null +++ b/source/Stargate-JSONWebToken-Extensions/package.st @@ -0,0 +1 @@ +Package { #name : #'Stargate-JSONWebToken-Extensions' }