Skip to content

Commit 73a1393

Browse files
committed
bug: make feature changes backwards compatible
1 parent 62052f7 commit 73a1393

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/main/kotlin/no/nav/security/mock/oauth2/MockOAuth2Server.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ open class MockOAuth2Server(
4949

5050
@JvmOverloads
5151
@Throws(IOException::class)
52-
fun start(inetAddress: InetAddress = InetAddress.getByName("localhost"), port: Int = 0) {
52+
fun start(port: Int = 0) = start(InetAddress.getByName("localhost"), port)
53+
54+
@Throws(IOException::class)
55+
fun start(inetAddress: InetAddress, port: Int) {
5356
log.debug("attempt to start server on port=$port")
5457
httpServer.start(inetAddress, port, router)
5558
}

src/main/kotlin/no/nav/security/mock/oauth2/OAuth2Config.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import no.nav.security.mock.oauth2.http.OAuth2HttpServer
55
import no.nav.security.mock.oauth2.token.OAuth2TokenCallback
66
import no.nav.security.mock.oauth2.token.OAuth2TokenProvider
77

8-
data class OAuth2Config(
8+
data class OAuth2Config @JvmOverloads constructor(
99
val interactiveLogin: Boolean = false,
1010
val tokenProvider: OAuth2TokenProvider = OAuth2TokenProvider(),
1111
val tokenCallbacks: Set<OAuth2TokenCallback> = emptySet(),

0 commit comments

Comments
 (0)