Skip to content

Commit

Permalink
🔧 update Hyperspace version dependecy
Browse files Browse the repository at this point in the history
  • Loading branch information
mreyes committed Jul 2, 2024
1 parent 7cd978c commit a678083
Show file tree
Hide file tree
Showing 50 changed files with 654 additions and 549 deletions.
29 changes: 15 additions & 14 deletions source/BaselineOfStargate/BaselineOfStargate.class.st
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Class {
#name : #BaselineOfStargate,
#superclass : #BaselineOf,
#category : #BaselineOfStargate
#name : 'BaselineOfStargate',
#superclass : 'BaselineOf',
#category : 'BaselineOfStargate',
#package : 'BaselineOfStargate'
}

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfStargate >> baseline: spec [

<baseline>
Expand All @@ -19,21 +20,21 @@ BaselineOfStargate >> baseline: spec [
group: 'Development' with: #( 'Tests' 'Tools' ) ]
]

{ #category : #'post-load actions' }
{ #category : 'post-load actions' }
BaselineOfStargate >> configureAsTransientInstancesOfAll: aClassCollection [

aClassCollection do: #makeInstancesDbTransient
]

{ #category : #'post-load actions' }
{ #category : 'post-load actions' }
BaselineOfStargate >> configureInstancesOfStargateJSONRPCClassesAsTransient [

self configureAsTransientInstancesOfAll: {
JsonRPCController.
JsonRPCRequestHandler }
]

{ #category : #'post-load actions' }
{ #category : 'post-load actions' }
BaselineOfStargate >> configureInstancesOfStargateModelClassesAsTransient [

self configureAsTransientInstancesOfAll: {
Expand All @@ -42,13 +43,13 @@ BaselineOfStargate >> configureInstancesOfStargateModelClassesAsTransient [
ResourceRESTfulController }
]

{ #category : #accessing }
{ #category : 'accessing' }
BaselineOfStargate >> projectClass [

^ MetacelloCypressBaselineProject
]

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfStargate >> setUpCorePackages: spec [

spec
Expand All @@ -71,7 +72,7 @@ BaselineOfStargate >> setUpCorePackages: spec [
group: 'Deployment' with: extensionPackageName ]
]

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfStargate >> setUpDependencies: spec [

spec
Expand All @@ -80,7 +81,7 @@ BaselineOfStargate >> setUpDependencies: spec [
project: 'Buoy-SUnit' copyFrom: 'Buoy' with: [ spec loads: 'Dependent-SUnit-Extensions' ].

spec
baseline: 'Hyperspace' with: [ spec repository: 'github://ba-st/Hyperspace:zinc-event-logger' ];
baseline: 'Hyperspace' with: [ spec repository: 'github://ba-st/Hyperspace:v5' ];
project: 'Hyperspace-Deployment' copyFrom: 'Hyperspace' with: [ spec loads: 'Deployment' ];
project: 'Hyperspace-Tools' copyFrom: 'Hyperspace' with: [ spec loads: 'Tools' ];
project: 'Hyperspace-SUnit'
Expand All @@ -105,7 +106,7 @@ BaselineOfStargate >> setUpDependencies: spec [
project: 'Launchpad-SUnit' copyFrom: 'Launchpad' with: [ spec loads: 'Dependent-SUnit-Extensions' ]
]

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfStargate >> setUpDeploymentPackages: spec [

self setUpCorePackages: spec.
Expand Down Expand Up @@ -170,7 +171,7 @@ BaselineOfStargate >> setUpDeploymentPackages: spec [
group: 'Deployment' with: 'Stargate-API-Skeleton'
]

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfStargate >> setUpPackages: spec [

self setUpDeploymentPackages: spec.
Expand All @@ -183,7 +184,7 @@ BaselineOfStargate >> setUpPackages: spec [
self setUpTestPackages: spec
]

{ #category : #baselines }
{ #category : 'baselines' }
BaselineOfStargate >> setUpTestPackages: spec [

spec
Expand Down
2 changes: 1 addition & 1 deletion source/BaselineOfStargate/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #BaselineOfStargate }
Package { #name : 'BaselineOfStargate' }
10 changes: 6 additions & 4 deletions source/Stargate-Model/AllowAnyOriginPolicy.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
I'm a policy configuring a CORS filter in such a way that sets Access-Control-Allow-Origin header to allow any origin.
"
Class {
#name : #AllowAnyOriginPolicy,
#superclass : #AllowOriginPolicy,
#category : 'Stargate-Model-CORS'
#name : 'AllowAnyOriginPolicy',
#superclass : 'AllowOriginPolicy',
#category : 'Stargate-Model-CORS',
#package : 'Stargate-Model',
#tag : 'CORS'
}

{ #category : #'configuring headers' }
{ #category : 'configuring headers' }
AllowAnyOriginPolicy >> applyOn: aResponse for: aRequest using: aHandler [

aHandler setAnyOriginAllowedOn: aResponse
Expand Down
10 changes: 6 additions & 4 deletions source/Stargate-Model/AllowOriginPolicy.class.st
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Class {
#name : #AllowOriginPolicy,
#superclass : #Object,
#category : 'Stargate-Model-CORS'
#name : 'AllowOriginPolicy',
#superclass : 'Object',
#category : 'Stargate-Model-CORS',
#package : 'Stargate-Model',
#tag : 'CORS'
}

{ #category : #'configuring headers' }
{ #category : 'configuring headers' }
AllowOriginPolicy >> applyOn: aResponse for: aRequest using: aHandler [

self subclassResponsibility
Expand Down
14 changes: 8 additions & 6 deletions source/Stargate-Model/AllowSpecifiedOriginsPolicy.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
I'm a policy configuring a CORS filter in such a way that sets Access-Control-Allow-Origin header to a specified set of origins.
"
Class {
#name : #AllowSpecifiedOriginsPolicy,
#superclass : #AllowOriginPolicy,
#name : 'AllowSpecifiedOriginsPolicy',
#superclass : 'AllowOriginPolicy',
#instVars : [
'allowedOrigins'
],
#category : 'Stargate-Model-CORS'
#category : 'Stargate-Model-CORS',
#package : 'Stargate-Model',
#tag : 'CORS'
}

{ #category : #'instance creation' }
{ #category : 'instance creation' }
AllowSpecifiedOriginsPolicy class >> onlyFrom: anUrlCollection [

^ self new initializeOnlyFrom: ( anUrlCollection collect: #asWebOrigin )
]

{ #category : #'configuring headers' }
{ #category : 'configuring headers' }
AllowSpecifiedOriginsPolicy >> applyOn: aResponse for: aRequest using: aHandler [

| requestOrigin |
Expand All @@ -32,7 +34,7 @@ AllowSpecifiedOriginsPolicy >> applyOn: aResponse for: aRequest using: aHandler
ifNone: [ aRequest abort: TeaResponse noContent ]
]

{ #category : #initialization }
{ #category : 'initialization' }
AllowSpecifiedOriginsPolicy >> initializeOnlyFrom: origins [

allowedOrigins := origins
Expand Down
24 changes: 13 additions & 11 deletions source/Stargate-Model/AuthenticationFilter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
I'm an abstract class representing an authentication filter to be applied as a before filter and perform an auth validation. I will take into consideration the Authorization header on the request and return a 401 / Unauthorized in case the credentials are invalid.
"
Class {
#name : #AuthenticationFilter,
#superclass : #Object,
#category : 'Stargate-Model-Auth'
#name : 'AuthenticationFilter',
#superclass : 'Object',
#category : 'Stargate-Model-Auth',
#package : 'Stargate-Model',
#tag : 'Auth'
}

{ #category : #'instance creation' }
{ #category : 'instance creation' }
AuthenticationFilter class >> basedOn: configuration [

^ self allSubclasses
Expand All @@ -16,37 +18,37 @@ AuthenticationFilter class >> basedOn: configuration [
ifNone: [ self signalMissingConfiguration ]
]

{ #category : #private }
{ #category : 'private' }
AuthenticationFilter class >> canHandle: configuration [

^ self subclassResponsibility
]

{ #category : #private }
{ #category : 'private' }
AuthenticationFilter class >> configuredBy: configuration [

^ self subclassResponsibility
]

{ #category : #private }
{ #category : 'private' }
AuthenticationFilter class >> signalMissingConfiguration [

^ ObjectNotFound signal: 'Missing authentication configuration'
]

{ #category : #accessing }
{ #category : 'accessing' }
AuthenticationFilter >> authChallenge [

^ self subclassResponsibility
]

{ #category : #private }
{ #category : 'private' }
AuthenticationFilter >> checkCredentials: authorization for: httpRequest within: requestContext ifInvalid: aBlock [

self subclassResponsibility
]

{ #category : #evaluating }
{ #category : 'evaluating' }
AuthenticationFilter >> evaluateActionOnRequest: httpRequest within: requestContext [

| authorization |
Expand All @@ -61,7 +63,7 @@ AuthenticationFilter >> evaluateActionOnRequest: httpRequest within: requestCont
ifInvalid: [ httpRequest abort: ( ZnResponse unauthorized: self authChallenge ) ]
]

{ #category : #evaluating }
{ #category : 'evaluating' }
AuthenticationFilter >> teaEvalActionOnRequest: httpRequest [

self evaluateActionOnRequest: httpRequest within: HttpRequestContext new
Expand Down
Loading

0 comments on commit a678083

Please sign in to comment.