fixed some issue for the token authorization #87

Merged
Maxime merged 2 commits from Max/Backend/GetUser into master 2024-03-10 23:28:14 +01:00
Owner
No description provided.
Maxime added 1 commit 2024-03-09 19:54:12 +01:00
fixed some issue for the token authorization
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m4s
Build and test backend / Test-backend (pull_request) Successful in 1m57s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 23s
d3303749f8
tonitch requested changes 2024-03-09 23:25:22 +01:00
tonitch left a comment
Owner

wtf bro je sais même plus ou j'ai commencé mais je pense que .... ouai....

wtf bro je sais même plus ou j'ai commencé mais je pense que .... ouai....
@ -0,0 +9,4 @@
import ovh.herisson.Clyde.Tables.Token;
@RestController
@CrossOrigin(origins = "http://localhost:5173")
Owner

Dans le dernier pr j'ai fait un petit changement au cross origin. Pour l'instant c'est bon mais c'est juste pour attirer l'attention sur ça !

Dans le dernier pr j'ai fait un petit changement au cross origin. Pour l'instant c'est bon mais c'est juste pour attirer l'attention sur ça !
@ -0,0 +20,4 @@
}
@GetMapping("/tokens")
Owner

C'est pour le debug ? Faudrait mettre un TODO pour mettre ça que pour les admins

C'est pour le debug ? Faudrait mettre un TODO pour mettre ça que pour les admins
@ -27,3 +26,1 @@
User user = authServ.getUserFromToken(token);
if (user == null) {
return new UnauthorizedResponse<>(null);
public ResponseEntity<User> getUser(@RequestHeader("Cookie") String cookie){
Owner

Pourquoi le passage à Coookie ?

Pourquoi le passage à Coookie ?
Owner

'Authorization': session_token,

https://git.herisson.ovh/PGL/Clyde/src/commit/8fdfb470cb3c130f0d0e3bde1adc9b7e4edb1981/frontend/src/rest/restConsumer.js#L35
@ -9,4 +9,5 @@ public interface TokenRepository extends CrudRepository<Token,Long> {
Token getByToken(String token);
Iterable<Token> getByUser(User user);
Owner

t'es sur ?

t'es sur ?
Maxime marked this conversation as resolved
@ -28,1 +32,4 @@
bytes[i] = (byte) (((bytes[i]+256)%256 %95+ 32));
while ((char)bytes[i] == ';'){
bytes[i] = new SecureRandom().generateSeed(1)[0];
}
Owner

FAIT DU MD5

FAIT DU MD5
Maxime marked this conversation as resolved
tonitch approved these changes 2024-03-10 00:05:27 +01:00
Dismissed
Maxime added 1 commit 2024-03-10 10:44:39 +01:00
cookie -> authorization
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m3s
Build and test backend / Test-backend (pull_request) Successful in 2m0s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 26s
1ad67edabb
Maxime dismissed tonitch’s review 2024-03-10 10:44:39 +01:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

tonitch requested review from tonitch 2024-03-10 20:35:00 +01:00
tonitch approved these changes 2024-03-10 20:35:06 +01:00
Maxime merged commit ce2efb61c8 into master 2024-03-10 23:28:14 +01:00
Maxime deleted branch Max/Backend/GetUser 2024-03-10 23:28:14 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: PGL/Clyde#87
No description provided.