Skip to content

Commit 3a13434

Browse files
feat: make authMethod nullable
There are some circumstances where we cannot set authMethod, which requires us to pass null. JIRA: LX-671 risk: low
1 parent 0741643 commit 3a13434

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

gooddata-server-oauth2-autoconfigure/src/main/kotlin/AuthenticationProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ sealed class AuthenticationProcessor<in authenticationToken : AbstractAuthentica
4646
organization: Organization,
4747
user: User,
4848
name: String?,
49-
authMethod: AuthMethod,
49+
authMethod: AuthMethod?,
5050
monoProvider: () -> Mono<T>,
5151
): Mono<T> = monoProvider().contextWrite(
5252
reactorUserContextProvider.getContextView(organization.id, user.id, name, user.usedTokenId, authMethod)

gooddata-server-oauth2-autoconfigure/src/main/kotlin/UserContextHolder.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fun interface ReactorUserContextProvider {
6262
userId: String,
6363
userName: String?,
6464
tokenId: String?,
65-
authMethod: AuthMethod
65+
authMethod: AuthMethod?,
6666
): ContextView
6767
}
6868

@@ -89,7 +89,7 @@ interface AuthenticationUserContext {
8989
/**
9090
* Method of authentication
9191
*/
92-
val authMethod: AuthMethod
92+
val authMethod: AuthMethod?
9393
}
9494

9595
enum class AuthMethod(val value: String) {

gooddata-server-oauth2-autoconfigure/src/test/kotlin/UserContextWebFluxTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ class UserContextWebFluxTest(
600600
override val userId: String,
601601
val userName: String?,
602602
override var tokenId: String? = null,
603-
override var authMethod: AuthMethod,
603+
override var authMethod: AuthMethod? = null,
604604
) : AuthenticationUserContext
605605

606606
object CoroutineUserContextHolder : UserContextHolder<UserContext> {

0 commit comments

Comments
 (0)