-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working on making a structure that makes sense
- Loading branch information
1 parent
4468035
commit e988c6a
Showing
7 changed files
with
40 additions
and
9 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
server.error.whitelabel.enabled=false | ||
# spring config | ||
server.error.whitelabel.enabled=false | ||
|
||
spring.datasource.url=jdbc:postgresql://localhost:5432/bringo_dev | ||
spring.datasource.username=bringo | ||
spring.datasource.password=bringo1 | ||
|
||
spring.flyway.user=bringo | ||
spring.flyway.password=bringo1 | ||
spring.flyway.url=jdbc:postgresql://localhost:5432/bringo_dev | ||
spring.flyway.locations=classpath:db/migration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CREATE TABLE IF NOT EXISTS users ( | ||
user_id serial PRIMARY KEY, | ||
password VARCHAR (255) NOT NULL, | ||
email VARCHAR (255) UNIQUE NOT NULL, | ||
created_on TIMESTAMP NOT NULL, | ||
last_login TIMESTAMP | ||
); | ||
|
||
CREATE INDEX users_email_password ON users (email, password); | ||
|
||
INSERT INTO users (password, email, created_on) | ||
VALUES ('$argon2i$v=19$m=65536,t=10,p=1$FgVrvOhkkEHtWRIc6W29gw$0P1W/kPR7/FWR0ti48F5SSHetUfqSaUaueOr92oUDuw', '[email protected]', now()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.bringo.server.utils | ||
|
||
import de.mkammerer.argon2.Argon2Factory | ||
|
||
object CryptoUtils { | ||
def hashPasswod (pdub: String) = { | ||
val argon = Argon2Factory.create() | ||
argon.hash(10, 65536, 1, pdub.toCharArray()) | ||
} | ||
} |