mirror of
https://github.com/TanelOrumaa/Estonian-ID-card-mobile-authenticator-POC.git
synced 2024-11-05 13:30:59 +02:00
Created the outline for token creation.
This commit is contained in:
parent
76fecd766f
commit
e975a3e262
@ -95,6 +95,10 @@ public class Comms {
|
||||
keyMAC = keys[1];
|
||||
}
|
||||
|
||||
public byte[] getAuthenticationCertificate() {
|
||||
return new byte[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the message authentication code
|
||||
*
|
||||
|
@ -0,0 +1,22 @@
|
||||
package com.tarkvaraprojekt.mobileauthapp.auth
|
||||
|
||||
import android.nfc.tech.IsoDep
|
||||
import com.tarkvaraprojekt.mobileauthapp.NFC.Comms
|
||||
import java.math.BigInteger
|
||||
|
||||
class Authenticator(val comms : Comms) {
|
||||
|
||||
public fun authenticate(nonce: BigInteger, challengeUrl: String, pin1: String) {
|
||||
|
||||
// Ask PIN 1 from the user and get the authentication certificate from the ID card.
|
||||
val authenticationCertificate : ByteArray = comms.getAuthenticationCertificate();
|
||||
|
||||
// Create the authentication token (OpenID X509)
|
||||
|
||||
// Hash the authentication token.
|
||||
|
||||
// Send the authentication token hash to the ID card for signing and get signed authentication token as response.
|
||||
|
||||
// Return the signed authentication token.
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user