From 4b5dfb4da043a94ee61d149122d8c5227b436f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Prei=C3=9Fner?= Date: Fri, 12 Jul 2024 13:06:13 +0200 Subject: [PATCH] updated authenticator --- .../instance/actionSubmit.st | 6 ++--- .../instance/resetCredentials.st | 2 +- .../instance/token.st | 2 +- .../instance/username.st | 2 +- .../methodProperties.json | 8 +++---- .../class/token..st | 0 .../SPBAuthenticator.class/class/token.st | 4 ++++ .../class/username..st | 0 .../SPBAuthenticator.class/class/username.st | 4 ++++ .../instance/authenticate.st | 5 ++-- .../instance/checkIfCredentialsMissing.st | 3 --- .../instance/errorGarbageToken.st | 2 +- .../instance/errorInvalidTokenScopes.st | 2 +- .../instance/errorNoScopes.st | 2 +- .../SPBAuthenticator.class/instance/token..st | 2 +- .../SPBAuthenticator.class/instance/token.st | 2 +- .../instance/username..st | 2 +- .../instance/username.st | 2 +- .../methodProperties.json | 24 +++++++++++-------- .../SPBAuthenticator.class/properties.json | 3 ++- .../SPBBoard.class/class/errorParsingUrl.st | 2 +- .../SPBBoard.class/class/newWith..st | 5 ++-- .../SPBBoard.class/instance/loadProject..st | 4 +--- .../SPBBoard.class/methodProperties.json | 6 ++--- .../SPBGithubAPI.class/class/token.st | 2 +- .../SPBGithubAPI.class/class/username.st | 2 +- .../SPBGithubAPI.class/methodProperties.json | 6 ++--- .../SPBGithubAPI.class/properties.json | 3 +-- .../SPBNewGithubAPI.class/class/token..st | 4 ---- .../SPBNewGithubAPI.class/class/token.st | 2 +- .../instance/authError.st | 6 +++++ .../instance/queryProjectID.user..st | 1 + .../methodProperties.json | 6 ++--- .../instance/testActionToken.st | 2 +- .../instance/testActionUsername.st | 2 +- .../methodProperties.json | 4 ++-- 36 files changed, 72 insertions(+), 62 deletions(-) rename Squello-Core.package/{SPBGithubAPI.class => SPBAuthenticator.class}/class/token..st (100%) create mode 100644 Squello-Core.package/SPBAuthenticator.class/class/token.st rename Squello-Core.package/{SPBGithubAPI.class => SPBAuthenticator.class}/class/username..st (100%) create mode 100644 Squello-Core.package/SPBAuthenticator.class/class/username.st delete mode 100644 Squello-Core.package/SPBNewGithubAPI.class/class/token..st create mode 100644 Squello-Core.package/SPBNewGithubAPI.class/instance/authError.st diff --git a/Squello-Core.package/SPBAuthenticationForm.class/instance/actionSubmit.st b/Squello-Core.package/SPBAuthenticationForm.class/instance/actionSubmit.st index 54fd0143..336303cd 100644 --- a/Squello-Core.package/SPBAuthenticationForm.class/instance/actionSubmit.st +++ b/Squello-Core.package/SPBAuthenticationForm.class/instance/actionSubmit.st @@ -5,9 +5,9 @@ actionSubmit areCredentialsNil := (self username isNil or: [self token isNil]). areCredentialsNil ifTrue: [^ self errorEmptyField]. - SPBGithubAPI token: self token. - oldUsername := SPBGithubAPI username. - SPBGithubAPI username: self username. + SPBAuthenticator token: self token. + oldUsername := SPBAuthenticator username. + SPBAuthenticator username: self username. (self checkUserValid) ifTrue: [self changed: #close] diff --git a/Squello-Core.package/SPBAuthenticationForm.class/instance/resetCredentials.st b/Squello-Core.package/SPBAuthenticationForm.class/instance/resetCredentials.st index 76e85914..c1fde027 100644 --- a/Squello-Core.package/SPBAuthenticationForm.class/instance/resetCredentials.st +++ b/Squello-Core.package/SPBAuthenticationForm.class/instance/resetCredentials.st @@ -2,7 +2,7 @@ actions resetCredentials "Resets the username and token to nil to log out the user." - SPBGithubAPI + SPBAuthenticator username: nil; token: nil. UserDialogBoxMorph inform: 'Credentials have been reset.' title: 'Logged out'. diff --git a/Squello-Core.package/SPBAuthenticationForm.class/instance/token.st b/Squello-Core.package/SPBAuthenticationForm.class/instance/token.st index c53e8fb7..1506a3d7 100644 --- a/Squello-Core.package/SPBAuthenticationForm.class/instance/token.st +++ b/Squello-Core.package/SPBAuthenticationForm.class/instance/token.st @@ -1,4 +1,4 @@ accessing token - ^ token ifNil: [token := SPBGithubAPI token]. \ No newline at end of file + ^ token ifNil: [token := SPBAuthenticator token]. \ No newline at end of file diff --git a/Squello-Core.package/SPBAuthenticationForm.class/instance/username.st b/Squello-Core.package/SPBAuthenticationForm.class/instance/username.st index 70319a09..9120bbb1 100644 --- a/Squello-Core.package/SPBAuthenticationForm.class/instance/username.st +++ b/Squello-Core.package/SPBAuthenticationForm.class/instance/username.st @@ -1,4 +1,4 @@ accessing username - ^ username ifNil: [username := SPBGithubAPI username]. \ No newline at end of file + ^ username ifNil: [username := SPBAuthenticator username]. \ No newline at end of file diff --git a/Squello-Core.package/SPBAuthenticationForm.class/methodProperties.json b/Squello-Core.package/SPBAuthenticationForm.class/methodProperties.json index dc468fd3..963c15a2 100644 --- a/Squello-Core.package/SPBAuthenticationForm.class/methodProperties.json +++ b/Squello-Core.package/SPBAuthenticationForm.class/methodProperties.json @@ -3,7 +3,7 @@ "open" : "jh 7/31/2022 13:05" }, "instance" : { "actionCancel" : "mcr 7/4/2022 00:36", - "actionSubmit" : "mcr 8/4/2022 00:25", + "actionSubmit" : "FP 7/12/2024 12:58", "buildButtons:" : "FP 6/13/2024 11:10", "buildInputFields:" : "mcr 8/4/2022 00:18", "buildInputPanel:" : "tk 8/2/2022 23:42", @@ -13,10 +13,10 @@ "errorEmptyField" : "mcr 8/4/2022 00:36", "errorUserNotFound" : "mcr 8/4/2022 00:36", "labelString" : "lo 7/13/2022 19:29", - "resetCredentials" : "FP 6/10/2024 10:10", - "token" : "mcr 8/4/2022 00:13", + "resetCredentials" : "FP 7/12/2024 12:58", + "token" : "FP 7/12/2024 13:04", "token:" : "lo 7/13/2022 19:26", "updateToken:" : "mcr 8/4/2022 00:18", "updateUsername:" : "mcr 8/4/2022 00:18", - "username" : "mcr 8/4/2022 00:12", + "username" : "FP 7/12/2024 12:57", "username:" : "lo 7/13/2022 19:27" } } diff --git a/Squello-Core.package/SPBGithubAPI.class/class/token..st b/Squello-Core.package/SPBAuthenticator.class/class/token..st similarity index 100% rename from Squello-Core.package/SPBGithubAPI.class/class/token..st rename to Squello-Core.package/SPBAuthenticator.class/class/token..st diff --git a/Squello-Core.package/SPBAuthenticator.class/class/token.st b/Squello-Core.package/SPBAuthenticator.class/class/token.st new file mode 100644 index 00000000..20a5e50b --- /dev/null +++ b/Squello-Core.package/SPBAuthenticator.class/class/token.st @@ -0,0 +1,4 @@ +accessing +token + + ^ Token. \ No newline at end of file diff --git a/Squello-Core.package/SPBGithubAPI.class/class/username..st b/Squello-Core.package/SPBAuthenticator.class/class/username..st similarity index 100% rename from Squello-Core.package/SPBGithubAPI.class/class/username..st rename to Squello-Core.package/SPBAuthenticator.class/class/username..st diff --git a/Squello-Core.package/SPBAuthenticator.class/class/username.st b/Squello-Core.package/SPBAuthenticator.class/class/username.st new file mode 100644 index 00000000..5a3eaf5b --- /dev/null +++ b/Squello-Core.package/SPBAuthenticator.class/class/username.st @@ -0,0 +1,4 @@ +accessing +username + + ^ Username \ No newline at end of file diff --git a/Squello-Core.package/SPBAuthenticator.class/instance/authenticate.st b/Squello-Core.package/SPBAuthenticator.class/instance/authenticate.st index 34c3a44d..7a6b6d12 100644 --- a/Squello-Core.package/SPBAuthenticator.class/instance/authenticate.st +++ b/Squello-Core.package/SPBAuthenticator.class/instance/authenticate.st @@ -6,5 +6,6 @@ authenticate self checkIfCredentialsMissing ifTrue: [self errorAuthenticationCanceled. Error signal]. - [self checkIfTokenValid] - on: Error do: [Error signal]. \ No newline at end of file + "this is now handled by the boardProvider" + "[self checkIfTokenValid] + on: Error do: [Error signal]." \ No newline at end of file diff --git a/Squello-Core.package/SPBAuthenticator.class/instance/checkIfCredentialsMissing.st b/Squello-Core.package/SPBAuthenticator.class/instance/checkIfCredentialsMissing.st index f7c302e1..35a4b30a 100644 --- a/Squello-Core.package/SPBAuthenticator.class/instance/checkIfCredentialsMissing.st +++ b/Squello-Core.package/SPBAuthenticator.class/instance/checkIfCredentialsMissing.st @@ -1,7 +1,4 @@ authentication checkIfCredentialsMissing - self username: SPBGithubAPI username. - self token: SPBGithubAPI token. - ^ self username isNil or: [self token isNil]. \ No newline at end of file diff --git a/Squello-Core.package/SPBAuthenticator.class/instance/errorGarbageToken.st b/Squello-Core.package/SPBAuthenticator.class/instance/errorGarbageToken.st index 91261be1..78cb5180 100644 --- a/Squello-Core.package/SPBAuthenticator.class/instance/errorGarbageToken.st +++ b/Squello-Core.package/SPBAuthenticator.class/instance/errorGarbageToken.st @@ -3,5 +3,5 @@ errorGarbageToken UserDialogBoxMorph inform: 'Not a valid token' title: 'Operation canceled'. - SPBGithubAPI token: nil. + SPBAuthenticator token: nil. ^ Error signal. \ No newline at end of file diff --git a/Squello-Core.package/SPBAuthenticator.class/instance/errorInvalidTokenScopes.st b/Squello-Core.package/SPBAuthenticator.class/instance/errorInvalidTokenScopes.st index 046af75d..9987ab7a 100644 --- a/Squello-Core.package/SPBAuthenticator.class/instance/errorInvalidTokenScopes.st +++ b/Squello-Core.package/SPBAuthenticator.class/instance/errorInvalidTokenScopes.st @@ -4,5 +4,5 @@ errorInvalidTokenScopes UserDialogBoxMorph inform: 'Invalid token or username or repository is private. Token has only public_repo scope' title: 'Operation canceled'. - SPBGithubAPI token: nil. + SPBAuthenticator token: nil. ^ Error signal. \ No newline at end of file diff --git a/Squello-Core.package/SPBAuthenticator.class/instance/errorNoScopes.st b/Squello-Core.package/SPBAuthenticator.class/instance/errorNoScopes.st index 8601c7a2..0f8298c2 100644 --- a/Squello-Core.package/SPBAuthenticator.class/instance/errorNoScopes.st +++ b/Squello-Core.package/SPBAuthenticator.class/instance/errorNoScopes.st @@ -3,5 +3,5 @@ errorNoScopes UserDialogBoxMorph inform: 'Make sure the token has repo or public_repo scope' title: 'Operation cancelled'. - SPBGithubAPI token: nil. + self token: nil. ^ Error signal. \ No newline at end of file diff --git a/Squello-Core.package/SPBAuthenticator.class/instance/token..st b/Squello-Core.package/SPBAuthenticator.class/instance/token..st index c06ae943..d943fbc1 100644 --- a/Squello-Core.package/SPBAuthenticator.class/instance/token..st +++ b/Squello-Core.package/SPBAuthenticator.class/instance/token..st @@ -1,4 +1,4 @@ accessing token: aString - token := aString. \ No newline at end of file + self class token: aString. \ No newline at end of file diff --git a/Squello-Core.package/SPBAuthenticator.class/instance/token.st b/Squello-Core.package/SPBAuthenticator.class/instance/token.st index f8ac7750..e968714c 100644 --- a/Squello-Core.package/SPBAuthenticator.class/instance/token.st +++ b/Squello-Core.package/SPBAuthenticator.class/instance/token.st @@ -1,4 +1,4 @@ accessing token - ^ token. \ No newline at end of file + ^ self class token. \ No newline at end of file diff --git a/Squello-Core.package/SPBAuthenticator.class/instance/username..st b/Squello-Core.package/SPBAuthenticator.class/instance/username..st index 8f1f4602..8a8a912a 100644 --- a/Squello-Core.package/SPBAuthenticator.class/instance/username..st +++ b/Squello-Core.package/SPBAuthenticator.class/instance/username..st @@ -1,4 +1,4 @@ accessing username: aString - username := aString. \ No newline at end of file + self class username: aString. \ No newline at end of file diff --git a/Squello-Core.package/SPBAuthenticator.class/instance/username.st b/Squello-Core.package/SPBAuthenticator.class/instance/username.st index 8beadc24..545f5e68 100644 --- a/Squello-Core.package/SPBAuthenticator.class/instance/username.st +++ b/Squello-Core.package/SPBAuthenticator.class/instance/username.st @@ -1,4 +1,4 @@ accessing username - ^ username. \ No newline at end of file + ^ self class username. \ No newline at end of file diff --git a/Squello-Core.package/SPBAuthenticator.class/methodProperties.json b/Squello-Core.package/SPBAuthenticator.class/methodProperties.json index 3e9a497f..e89c9d18 100644 --- a/Squello-Core.package/SPBAuthenticator.class/methodProperties.json +++ b/Squello-Core.package/SPBAuthenticator.class/methodProperties.json @@ -1,21 +1,25 @@ { "class" : { - "newWith:" : "mcr 8/2/2022 17:38" }, + "newWith:" : "mcr 8/2/2022 17:38", + "token" : "FP 7/12/2024 12:50", + "token:" : "FP 7/12/2024 12:50", + "username" : "FP 7/12/2024 12:50", + "username:" : "FP 7/12/2024 12:50" }, "instance" : { - "authenticate" : "mcr 8/4/2022 00:26", + "authenticate" : "FP 7/12/2024 12:55", "boardProvider" : "mcr 8/2/2022 18:26", "boardProvider:" : "mcr 8/2/2022 18:26", - "checkIfCredentialsMissing" : "mcr 8/4/2022 02:19", + "checkIfCredentialsMissing" : "FP 7/12/2024 12:56", "checkIfTokenValid" : "mcr 8/4/2022 02:23", "detectInsufficientScopes:" : "mcr 8/4/2022 00:33", "errorAuthenticationCanceled" : "mcr 8/2/2022 21:49", - "errorGarbageToken" : "mcr 8/2/2022 22:08", - "errorInvalidTokenScopes" : "mcr 8/3/2022 23:31", - "errorNoScopes" : "mcr 8/2/2022 22:31", + "errorGarbageToken" : "FP 7/12/2024 13:00", + "errorInvalidTokenScopes" : "FP 7/12/2024 13:00", + "errorNoScopes" : "FP 7/12/2024 12:52", "errorRepoNotFound" : "mcr 8/2/2022 21:50", "getTokenScopes" : "mcr 8/4/2022 00:34", - "token" : "mcr 8/2/2022 18:26", - "token:" : "mcr 8/2/2022 18:26", + "token" : "FP 7/12/2024 12:52", + "token:" : "FP 7/12/2024 12:52", "tryQueryRepo" : "mcr 8/4/2022 01:12", - "username" : "mcr 8/2/2022 18:27", - "username:" : "mcr 8/2/2022 18:27" } } + "username" : "FP 7/12/2024 12:53", + "username:" : "FP 7/12/2024 12:53" } } diff --git a/Squello-Core.package/SPBAuthenticator.class/properties.json b/Squello-Core.package/SPBAuthenticator.class/properties.json index 0c5c72fe..e42da47c 100644 --- a/Squello-Core.package/SPBAuthenticator.class/properties.json +++ b/Squello-Core.package/SPBAuthenticator.class/properties.json @@ -3,7 +3,8 @@ "classinstvars" : [ ], "classvars" : [ - ], + "Token", + "Username" ], "commentStamp" : "mcr 8/2/2022 22:57", "instvars" : [ "boardProvider", diff --git a/Squello-Core.package/SPBBoard.class/class/errorParsingUrl.st b/Squello-Core.package/SPBBoard.class/class/errorParsingUrl.st index 27098909..ec92c71a 100644 --- a/Squello-Core.package/SPBBoard.class/class/errorParsingUrl.st +++ b/Squello-Core.package/SPBBoard.class/class/errorParsingUrl.st @@ -2,4 +2,4 @@ startup errorParsingUrl UserDialogBoxMorph - inform: 'Invalid repository Url' title: 'Error parsing Url'. \ No newline at end of file + inform: 'An error occurred when parsing the url' title: 'Error parsing Url'. \ No newline at end of file diff --git a/Squello-Core.package/SPBBoard.class/class/newWith..st b/Squello-Core.package/SPBBoard.class/class/newWith..st index 27702ed9..ae6b71a8 100644 --- a/Squello-Core.package/SPBBoard.class/class/newWith..st +++ b/Squello-Core.package/SPBBoard.class/class/newWith..st @@ -4,8 +4,9 @@ newWith: aString | instance | instance := self new. - "["instance loadProject: aString."] - on: Error do: [self errorParsingUrl. ^ self]." + SPBAuthenticator new authenticate. + [instance loadProject: aString.] + on: Error do: [self errorParsingUrl. ^ self]. instance buildAndOpen. ^ instance. \ No newline at end of file diff --git a/Squello-Core.package/SPBBoard.class/instance/loadProject..st b/Squello-Core.package/SPBBoard.class/instance/loadProject..st index 66344489..cff898c0 100644 --- a/Squello-Core.package/SPBBoard.class/instance/loadProject..st +++ b/Squello-Core.package/SPBBoard.class/instance/loadProject..st @@ -3,8 +3,6 @@ loadProject: aString (aString includesSubstring: '/projects') ifTrue: [self parseProjectFromUrl: aString] - "on: Error do: [self errorInvalidUrl.]]" - ifFalse: [[self chooseProjectFromUrl: aString] - on: Error do: [Error signal]]. + ifFalse: [self chooseProjectFromUrl: aString]. self setUpChangeProvider. \ No newline at end of file diff --git a/Squello-Core.package/SPBBoard.class/methodProperties.json b/Squello-Core.package/SPBBoard.class/methodProperties.json index dfa7eb6c..0cd405bd 100644 --- a/Squello-Core.package/SPBBoard.class/methodProperties.json +++ b/Squello-Core.package/SPBBoard.class/methodProperties.json @@ -1,12 +1,12 @@ { "class" : { "columnMinimumExtent" : "lo 8/1/2022 13:40", - "errorParsingUrl" : "mcr 8/4/2022 01:05", + "errorParsingUrl" : "FP 7/12/2024 12:40", "lastProject" : "tk 7/30/2022 21:54", "lastProject:" : "tk 7/30/2022 21:54", "localPrefix" : "FP 5/27/2024 17:40", "newLocalWith:" : "FP 6/25/2024 15:21", - "newWith:" : "FP 6/15/2024 13:20", + "newWith:" : "FP 7/12/2024 12:56", "open" : "FP 6/10/2024 16:24", "openFromPrompt:" : "FP 6/10/2024 16:26", "openLocal:" : "FP 6/25/2024 15:31", @@ -67,7 +67,7 @@ "initialize" : "FP 6/10/2024 14:43", "isLocal" : "FP 6/10/2024 15:01", "isLocal:" : "FP 6/10/2024 14:43", - "loadProject:" : "FP 6/15/2024 13:18", + "loadProject:" : "FP 7/12/2024 12:38", "makeLocal" : "FP 6/25/2024 14:19", "makeLocal:" : "FP 6/25/2024 14:19", "parseLocalRepoFromUrl:" : "FP 5/27/2024 17:13", diff --git a/Squello-Core.package/SPBGithubAPI.class/class/token.st b/Squello-Core.package/SPBGithubAPI.class/class/token.st index 20a5e50b..dbbd6f02 100644 --- a/Squello-Core.package/SPBGithubAPI.class/class/token.st +++ b/Squello-Core.package/SPBGithubAPI.class/class/token.st @@ -1,4 +1,4 @@ accessing token - ^ Token. \ No newline at end of file + ^ SPBAuthenticator token. \ No newline at end of file diff --git a/Squello-Core.package/SPBGithubAPI.class/class/username.st b/Squello-Core.package/SPBGithubAPI.class/class/username.st index 1121496e..c23bb957 100644 --- a/Squello-Core.package/SPBGithubAPI.class/class/username.st +++ b/Squello-Core.package/SPBGithubAPI.class/class/username.st @@ -1,4 +1,4 @@ accessing username - ^ Username. \ No newline at end of file + ^ SPBAuthenticator username. \ No newline at end of file diff --git a/Squello-Core.package/SPBGithubAPI.class/methodProperties.json b/Squello-Core.package/SPBGithubAPI.class/methodProperties.json index 654892bb..ae6ccb01 100644 --- a/Squello-Core.package/SPBGithubAPI.class/methodProperties.json +++ b/Squello-Core.package/SPBGithubAPI.class/methodProperties.json @@ -1,9 +1,7 @@ { "class" : { - "token" : "mcr 5/27/2022 23:06", - "token:" : "mcr 5/27/2022 23:06", - "username" : "mcr 5/28/2022 00:49", - "username:" : "mcr 5/27/2022 23:06" }, + "token" : "FP 7/12/2024 13:02", + "username" : "FP 7/12/2024 13:02" }, "instance" : { "addAssignee:toIssue:user:repo:" : "FP 6/15/2024 13:40", "addIssue:toColumn:" : "lo 6/6/2022 12:51", diff --git a/Squello-Core.package/SPBGithubAPI.class/properties.json b/Squello-Core.package/SPBGithubAPI.class/properties.json index b5d89e85..037b7168 100644 --- a/Squello-Core.package/SPBGithubAPI.class/properties.json +++ b/Squello-Core.package/SPBGithubAPI.class/properties.json @@ -3,8 +3,7 @@ "classinstvars" : [ ], "classvars" : [ - "Token", - "Username" ], + ], "commentStamp" : "LW 6/20/2022 10:00", "instvars" : [ ], diff --git a/Squello-Core.package/SPBNewGithubAPI.class/class/token..st b/Squello-Core.package/SPBNewGithubAPI.class/class/token..st deleted file mode 100644 index 1df26013..00000000 --- a/Squello-Core.package/SPBNewGithubAPI.class/class/token..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -token: aString - - Token := aString. \ No newline at end of file diff --git a/Squello-Core.package/SPBNewGithubAPI.class/class/token.st b/Squello-Core.package/SPBNewGithubAPI.class/class/token.st index 20a5e50b..dbbd6f02 100644 --- a/Squello-Core.package/SPBNewGithubAPI.class/class/token.st +++ b/Squello-Core.package/SPBNewGithubAPI.class/class/token.st @@ -1,4 +1,4 @@ accessing token - ^ Token. \ No newline at end of file + ^ SPBAuthenticator token. \ No newline at end of file diff --git a/Squello-Core.package/SPBNewGithubAPI.class/instance/authError.st b/Squello-Core.package/SPBNewGithubAPI.class/instance/authError.st new file mode 100644 index 00000000..28fa6d72 --- /dev/null +++ b/Squello-Core.package/SPBNewGithubAPI.class/instance/authError.st @@ -0,0 +1,6 @@ +errors +authError + + UserDialogBoxMorph + inform: 'Please make sure that your token has a suffient scope for this project.' title: 'Insufficient token scope'. + ^ Error signal. \ No newline at end of file diff --git a/Squello-Core.package/SPBNewGithubAPI.class/instance/queryProjectID.user..st b/Squello-Core.package/SPBNewGithubAPI.class/instance/queryProjectID.user..st index 716f8fa9..96d9ae4d 100644 --- a/Squello-Core.package/SPBNewGithubAPI.class/instance/queryProjectID.user..st +++ b/Squello-Core.package/SPBNewGithubAPI.class/instance/queryProjectID.user..st @@ -4,4 +4,5 @@ queryProjectID: aNumber user: aString | data responseJson | data := (self getQueryProjectIDQuery: aNumber user: aString) parseAsJson. responseJson := self postRequestwithData: data. + (responseJson at: 'data') ifNil: [self authError.]. ^ (((responseJson at: 'data') at: self userString) at: 'projectV2') at: 'id'. \ No newline at end of file diff --git a/Squello-Core.package/SPBNewGithubAPI.class/methodProperties.json b/Squello-Core.package/SPBNewGithubAPI.class/methodProperties.json index 1e86881b..973a1a8d 100644 --- a/Squello-Core.package/SPBNewGithubAPI.class/methodProperties.json +++ b/Squello-Core.package/SPBNewGithubAPI.class/methodProperties.json @@ -1,11 +1,11 @@ { "class" : { - "token" : "FP 6/13/2024 16:49", - "token:" : "FP 6/13/2024 16:49", + "token" : "FP 7/12/2024 12:45", "url" : "FP 6/15/2024 13:47" }, "instance" : { "addAssignee:toIssue:" : "FP 6/18/2024 12:12", "addLabel:toIssue:" : "FP 6/18/2024 13:51", + "authError" : "FP 7/12/2024 12:40", "createPostRequestTo:" : "FP 6/13/2024 16:58", "deleteAssignee:fromIssue:" : "FP 6/18/2024 11:18", "deleteLabel:fromIssue:" : "FP 6/18/2024 13:59", @@ -34,7 +34,7 @@ "queryColumnFieldId:" : "FP 6/19/2024 17:30", "queryColumns:" : "FP 6/19/2024 17:36", "queryProject:" : "FP 6/16/2024 15:40", - "queryProjectID:user:" : "FP 6/16/2024 15:28", + "queryProjectID:user:" : "FP 7/12/2024 12:37", "updateAssignees:fromDraft:" : "FP 6/18/2024 12:15", "updateCardPosition:after:inProject:" : "FP 6/19/2024 18:16", "updateDraft:" : "FP 6/18/2024 15:04", diff --git a/Squello-Tests.package/SPBAuthenticationFormTests.class/instance/testActionToken.st b/Squello-Tests.package/SPBAuthenticationFormTests.class/instance/testActionToken.st index b2e8a5b3..1c484fc9 100644 --- a/Squello-Tests.package/SPBAuthenticationFormTests.class/instance/testActionToken.st +++ b/Squello-Tests.package/SPBAuthenticationFormTests.class/instance/testActionToken.st @@ -2,7 +2,7 @@ tests testActionToken | token | - self assert: SPBGithubAPI token equals: auth token. + self assert: SPBAuthenticator token equals: auth token. token := 'SeCrEtToKeN'. auth updateToken: token. diff --git a/Squello-Tests.package/SPBAuthenticationFormTests.class/instance/testActionUsername.st b/Squello-Tests.package/SPBAuthenticationFormTests.class/instance/testActionUsername.st index ab81b797..16c09d66 100644 --- a/Squello-Tests.package/SPBAuthenticationFormTests.class/instance/testActionUsername.st +++ b/Squello-Tests.package/SPBAuthenticationFormTests.class/instance/testActionUsername.st @@ -3,7 +3,7 @@ testActionUsername | user | - self assert: SPBGithubAPI username equals: auth username. + self assert: SPBAuthenticator username equals: auth username. user := 'Username'. auth updateUsername: user. diff --git a/Squello-Tests.package/SPBAuthenticationFormTests.class/methodProperties.json b/Squello-Tests.package/SPBAuthenticationFormTests.class/methodProperties.json index caf847af..d218e722 100644 --- a/Squello-Tests.package/SPBAuthenticationFormTests.class/methodProperties.json +++ b/Squello-Tests.package/SPBAuthenticationFormTests.class/methodProperties.json @@ -4,8 +4,8 @@ "instance" : { "setUp" : "mcr 8/2/2022 23:01", "tearDown" : "jh 6/3/2022 20:57", - "testActionToken" : "mcr 8/4/2022 02:31", - "testActionUsername" : "mcr 8/4/2022 02:32", + "testActionToken" : "FP 7/12/2024 12:58", + "testActionUsername" : "FP 7/12/2024 13:00", "testBuildWith" : "mcr 7/4/2022 00:44", "testLabelString" : "lo 7/13/2022 19:29", "testToken" : "mcr 8/4/2022 02:39",