diff --git a/src/main/java/com/covas/Resources/TokenRessource.java b/src/main/java/com/covas/Resources/TokenRessource.java index 41836ee..7373ce7 100644 --- a/src/main/java/com/covas/Resources/TokenRessource.java +++ b/src/main/java/com/covas/Resources/TokenRessource.java @@ -54,6 +54,7 @@ public class TokenRessource { name = new String(Base64.decode(user), StandardCharsets.UTF_8); } } else { + String[] hash = new String(Base64.decode(auth.split(" ")[1]), StandardCharsets.UTF_8).split(":"); name = hash[0]; password = Hash.encryptSHA512(hash[1]); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 8af1028..66fd4ea 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -11,8 +11,8 @@ quarkus.datasource.username = toto quarkus.datasource.password = toto quarkus.datasource.jdbc.url = jdbc:postgresql://db:5432/toto # drop and create the database at startup (use `update` to only update the schema) -quarkus.hibernate-orm.database.generation = drop-and-create - +#quarkus.hibernate-orm.database.generation = drop-and-create +quarkus.hibernate-orm.database.generation = update covas.schema.create = true quarkus.mailer.auth-methods=DIGEST-MD5 CRAM-SHA256 CRAM-SHA1 CRAM-MD5 PLAIN LOGIN @@ -31,4 +31,4 @@ quarkus.http.cors=true quarkus.http.origins=http://localhost:8084 quarkus.http.cors.methods=GET,PUT,POST,DELETE,PATCH quarkus.http.cors.headers=accept,authorization,content-type,x-requested-with,x-foobar -quarkus.http.cors.access-control-allow-credentials=true \ No newline at end of file +quarkus.http.cors.access-control-allow-credentials=true