Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PoP check + exception handling #4

Merged
merged 10 commits into from
Jun 28, 2024
Merged

Add PoP check + exception handling #4

merged 10 commits into from
Jun 28, 2024

Conversation

Jdu278
Copy link
Collaborator

@Jdu278 Jdu278 commented Jun 27, 2024

In diesem PR habe ich den Check für die proof of possession eingefügt. Dabei wird mit dem beigelegten Public Key überprüft, ob die popNonce von der Wallet signiert wurde. Außerdem wird gecheckt, ob die nonce auch wirklich die nonce der Wallet ist, die wir herausgegeben und gespeichert haben.

Des Weiteren habe ich eine KeyConfiguration Klasse erstellt, die unseren Private Key decodiert. Damit wird dieser nur einmalig decodiert und dann in unseren Service gereicht. Falls der Key von uns falsch formatiert ist, gibt es so direkt beim Starten der Applikation einen Fehler und wir können das Format anpassen. Der Public Key hingegen muss bei jedem Request neu decodiert werden (decodePublicKey).

Um die Exceptions zentral handeln zu können und den Controller nicht zu bloaten habe ich die Datei ControllerAdvice.kt erstellt. Zudem habe ich die Dokumentation der Exceptions für die OpenAPI Definitionen angepasst.

In diesem PR wurden außerdem die Routen und das Naming angepasst (walletInstanceIdwalletId) so wie es am 20.06. besprochen wurde (@FabioTacke, @code28, @Jdu278).

@Jdu278 Jdu278 requested a review from code28 June 27, 2024 09:55
Copy link
Member

@code28 code28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sehr gut! 👍

@code28 code28 merged commit 14ee2fc into main Jun 28, 2024
3 checks passed
@code28 code28 deleted the PoP branch June 28, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants