Custom Authentication Provider Exercise¶
The common-auth module contains the provider used by this exercise.
Objective¶
Understand provider selection, credential validation, authority creation, and safe authentication failure behavior.
Procedure¶
- Read
CustomAuthenticationProviderand identify its supported token type. - Write a failing test for valid credentials.
- Add tests for invalid credentials and an unsupported token type.
- Verify authorities come from trusted server-side data.
- Verify failure responses do not distinguish unknown users from incorrect passwords.
- Run
./gradlew :common-auth:testand then./gradlew test.
Completion criteria¶
The provider authenticates only its supported token, retains no raw credential after success, logs no sensitive data, and has positive and negative tests.
This exercise is completed through LAB-002 and LAB-003. See the Custom Providers Reference.