Skip to content

Commit

Permalink
replace address with street1 and street2 for better i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
jona7o committed Apr 8, 2021
1 parent d78e6b8 commit 612d6bc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ An example (from the Standalone app looks like this):
"birthdate": 1617219803996,
"email": "[email protected]",
"phoneNumber": "0803199999",
"street": "Bahnhofstraße 1",
"street1": "Bahnhofstraße 1",
"street2": "",
"city": "Rosenheim",
"zip": "83022" ,
"country": "de",
Expand Down Expand Up @@ -64,7 +65,8 @@ The following list shows all possible fields, most of which are optional. Please
"birthdate": "timestamp in milliseconds",
"email": "[email protected] *required or phoneNumber",
"phoneNumber": "0803199999 *required or E-Mail",
"street": "Bahnhofstraße 1",
"street1": "Bahnhofstraße 1",
"street2": "",
"city": "Rosenheim",
"zip": "zip code",
"country": "2 letter Alpha-2 country code as defined in ISO 3166"
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

val appName = "corsign-core"
val libVersion = "1.0.1"
val libVersion = "1.0.2"
val scVersion = "2.13.5"

name := appName
Expand Down
11 changes: 6 additions & 5 deletions core/src/main/scala/corsign/core/app/Standalone.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ object Standalone extends App {
phoneNumber = Some("0803199999"),
email = Some("[email protected]"),
idCardNumber = Some("LFC123ABC"),
address = Some("Bahnhofstraße 1"),
street1 = Some("Bahnhofstraße 1"),
street2 = Some("Bahnhofstraße 1"),
zip = Some("83022"),
city = Some("Rosenheim"),
country = Some("Germany")
Expand All @@ -51,17 +52,17 @@ object Standalone extends App {
val token = JWTSigner.signWithRSA(claims, key)
println("\nSigned Token with this Key is:")
println(token)
println("\nParsed Content from validated Token is")
println("\nParsed content from validated Token is:")
println(SimpleRSAValidator.validateWithRSA(token.get, key).get)

println(key.jwkJson.toString())

println("\nNow try to sign with a Deserialized PEM Key")
println("\nNow try to sign with a Deserialized PEM Key:")
val token2 = JWTSigner.signWithRSA(claims, RSAKey.fromPEM(key.privateKeyPEM))
println("\nSecond JWT Token is:")
println("\nThe second JWT Token is:")
println(token2)

println("\nPrivate Key Hash for Signing Endpoint")
println("\nPrivate Key Hash for signing endpoint:")
println(key.privateKeySHA512)

println("\n\nNow generating a QR Code")
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/scala/corsign/core/model/Person.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ case class Person(
phoneNumber: Option[String] = None,
email: Option[String] = None,
idCardNumber: Option[String] = None,
address: Option[String] = None,
street1: Option[String] = None,
street2: Option[String] = None,
zip: Option[String] = None,
city: Option[String] = None,
country: Option[String] = None
Expand Down
3 changes: 2 additions & 1 deletion core/src/test/scala/corsign/core/jwt/JWTSignerSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class JWTSignerSpec extends AnyWordSpec with Matchers with ScalaCheckPropertyChe
phoneNumber = Some("0803199999"),
email = Some("[email protected]"),
idCardNumber = Some("LFC123ABC"),
address = Some("Bahnhofstraße 1"),
street1 = Some("Bahnhofstraße 1"),
street2 = Some("c/o innFactory"),
zip = Some("83022"),
city = Some("Rosenheim"),
country = Some("Germany")
Expand Down

0 comments on commit 612d6bc

Please sign in to comment.