Skip to content

Validate username and password early#104

Merged
martinbonnin merged 3 commits intomainfrom
validate-username-password
Jun 25, 2025
Merged

Validate username and password early#104
martinbonnin merged 3 commits intomainfrom
validate-username-password

Conversation

@martinbonnin
Copy link
Copy Markdown
Member

@martinbonnin martinbonnin commented Jun 24, 2025

See #103

Comment thread src/main/kotlin/nmcp/internal/utils.kt Outdated
Comment thread src/main/kotlin/nmcp/internal/utils.kt Outdated
Comment on lines +120 to +105
check(centralPortalOptions.username.isPresent) {
"Nmcp: username is missing"
}
check(centralPortalOptions.password.isPresent) {
"Nmcp: password is missing"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All the validations should better be reported, not just one of them

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We can check publishingType is one of AUTOMATIC | USER_MANAGED. Anything else?

@martinbonnin martinbonnin marked this pull request as draft June 25, 2025 15:08
@martinbonnin martinbonnin force-pushed the validate-username-password branch from df18a82 to 29f37b4 Compare June 25, 2025 17:06
@martinbonnin martinbonnin marked this pull request as ready for review June 25, 2025 17:07
use taskGraph.whenReady {}

# Conflicts:
#	src/main/kotlin/nmcp/internal/DefaultNmcpExtension.kt
#	src/main/kotlin/nmcp/internal/utils.kt

# Conflicts:
#	src/main/kotlin/nmcp/internal/DefaultNmcpExtension.kt
@martinbonnin martinbonnin force-pushed the validate-username-password branch from 29f37b4 to 554b1fa Compare June 25, 2025 18:37
@martinbonnin
Copy link
Copy Markdown
Member Author

Merging this as is for now. Will revisit to add more validations.

@martinbonnin martinbonnin merged commit 7aca548 into main Jun 25, 2025
1 check passed
@martinbonnin martinbonnin deleted the validate-username-password branch June 25, 2025 18:39
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