
io.p8e.grpc.client.AuthenticationClient.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of p8e-common Show documentation
Show all versions of p8e-common Show documentation
A collection of services and libraries that iteract and run Provenance Java based contracts.
The newest version!
package io.p8e.grpc.client
import io.grpc.ManagedChannel
import io.p8e.proto.Authentication
import io.p8e.proto.Authentication.Jwt
import io.p8e.proto.AuthenticationServiceGrpc
import java.util.concurrent.TimeUnit
class AuthenticationClient(
channel: ManagedChannel,
private val deadlineMs: Long
) {
private val blockingStub = AuthenticationServiceGrpc
.newBlockingStub(channel)
fun authenticate(
request: Authentication.AuthenticationRequest
): Jwt {
return blockingStub.withDeadlineAfter(deadlineMs, TimeUnit.MILLISECONDS)
.authenticate(request)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy