Merged
Conversation
This reverts commit 5dcb5ac.
Feature/ngsv2 client srp
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces SRP-based authentication support into the Moc Java client while integrating the new ngsiv2 client. Key changes include:
- Addition of SRP authentication classes (SmallK, SmallG, SmallA, LargeS, LargeN, LargeB, LargeA, Helper, HKDF).
- Implementation of token fetching via Cognito using SRP (FetchCognitoToken) and integration in MocClient.
- Updates to project configuration and documentation (README.md and GitHub Actions workflow).
Reviewed Changes
Copilot reviewed 23 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/city/makeour/moc/auth/srp/SmallK.java | Implements SRP k computation using SHA-256 and helper utilities. |
| src/main/java/city/makeour/moc/auth/srp/SmallG.java | Provides a constant generator value with a minor formatting issue. |
| src/main/java/city/makeour/moc/auth/srp/SmallA.java | Generates ephemeral client secret for SRP. |
| src/main/java/city/makeour/moc/auth/srp/LargeS.java | Computes the session key from SRP parameters. |
| src/main/java/city/makeour/moc/auth/srp/LargeN.java | Defines the large prime constant used in SRP. |
| src/main/java/city/makeour/moc/auth/srp/LargeB.java | Converts server ephemeral parameter from hex. |
| src/main/java/city/makeour/moc/auth/srp/LargeA.java | Computes the client public value using modular exponentiation. |
| src/main/java/city/makeour/moc/auth/srp/Helper.java | Provides utility methods for hex conversion and padding. |
| src/main/java/city/makeour/moc/auth/srp/HKDF.java | Implements a key derivation function based on HKDF and HMAC. |
| src/main/java/city/makeour/moc/TokenFetcherInterface.java | Specifies the token fetching interface for authentication. |
| src/main/java/city/makeour/moc/Token.java | Data class representing authentication tokens. |
| src/main/java/city/makeour/moc/RefreshTokenStorageInterface.java | Interface for refresh token management. |
| src/main/java/city/makeour/moc/RefreshTokenStorage.java | Implements storage operations for refresh tokens. |
| src/main/java/city/makeour/moc/MocClient.java | Integrates the ngsiv2 client and handles login and token setting. |
| src/main/java/city/makeour/moc/FetchCognitoToken.java | Implements SRP-based token fetching from Cognito. |
| src/main/java/city/makeour/FetchCognitoToken.java | Removed legacy SRP token fetching code. |
| README.md | Project documentation update. |
| .github/workflows/test.yml | GitHub Actions Maven test workflow. |
Files not reviewed (2)
- .editorconfig: Language not supported
- pom.xml: Language not supported
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.