-
Notifications
You must be signed in to change notification settings - Fork 1
Implement reading tokens from a resource #122
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Jasper Kamerling <jasper.kamerling@alliander.com>
Signed-off-by: Jasper Kamerling <jasper.kamerling@alliander.com>
Signed-off-by: Jasper Kamerling <jasper.kamerling@alliander.com>
Signed-off-by: Jasper Kamerling <jasper.kamerling@alliander.com>
| @Test | ||
| fun `should retrieve token from msal library`() { | ||
| val testToken = "test-token-value" | ||
| `when`(confidentialClientApplication.acquireToken(any<ClientCredentialParameters>())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use mockk now instead of Mockito
| import org.springframework.stereotype.Component | ||
|
|
||
| @Component | ||
| @Primary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This @Primary can be removed, because the Conditions exclude each other
...ken-client/src/main/kotlin/com/gxf/utilities/spring/oauth/config/condition/OAuthCondition.kt
Outdated
Show resolved
Hide resolved
|
|
||
| @Configuration | ||
| @Conditional(OAuthEnabledCondition::class) | ||
| @Conditional(OAuthMsalEnabledCondition::class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this properties class work for FileTokenProvider with this condition? It does work, but I don't see how...
Signed-off-by: Jasper Kamerling <jasper.kamerling@alliander.com>
Signed-off-by: Jasper Kamerling <jasper.kamerling@alliander.com>
Signed-off-by: Jasper Kamerling <jasper.kamerling@alliander.com>
Signed-off-by: Jasper Kamerling <jasper.kamerling@alliander.com>
|



No description provided.