Skip to content

Using ngsiv2 client#1

Merged
ushios merged 37 commits intomainfrom
feature/ngsiv2-client
May 2, 2025
Merged

Using ngsiv2 client#1
ushios merged 37 commits intomainfrom
feature/ngsiv2-client

Conversation

@ushios
Copy link
Contributor

@ushios ushios commented Apr 27, 2025

No description provided.

@ushios ushios requested a review from Copilot May 2, 2025 15:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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>
@ushios ushios merged commit 908d328 into main May 2, 2025
1 check passed
@ushios ushios deleted the feature/ngsiv2-client branch May 4, 2025 01:41
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