-
- All Implemented Interfaces:
-
org.openziti.identity.Identity
public interface ZitiContext implements Identity
Object representing an instantiated Ziti identity. It main purpose is to instantiate
connections to Ziti services
binding for hosting Ziti services in the app
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumZitiContext.ServiceUpdatepublic final classZitiContext.ServiceEventpublic classZitiContext.Status
-
Method Summary
-
-
Method Detail
-
setEnabled
abstract Unit setEnabled(Boolean v)
-
getStatus
abstract ZitiContext.Status getStatus()
-
statusUpdates
abstract StateFlow<ZitiContext.Status> statusUpdates()
-
serviceUpdates
abstract Flow<ZitiContext.ServiceEvent> serviceUpdates()
-
getIdentity
abstract Flow<Identity> getIdentity()
-
getService
abstract Service getService(InetSocketAddress addr)
-
getService
abstract Service getService(String name)
-
getServiceTerminators
abstract Collection<ServiceTerminator> getServiceTerminators(Service service)
-
dial
abstract ZitiConnection dial(String serviceName)
connect to Ziti service.
-
connect
abstract Socket connect(String host, Integer port)
connect to Ziti service identified by intercept host and port.
- Parameters:
host- intercept hostnameport- intercept port
-
open
abstract AsynchronousSocketChannel open()
creates unconnected AsynchronousSocketChannel.
before it can be used it has to be connected, via any standard AsynchronousSocketChannel.connect method with ZitiAddress.Dial address.
val con = zitiCtx.open() con.connect(ZitiAddress.Service(serviceName)).get()
-
openServer
abstract AsynchronousServerSocketChannel openServer()
creates unbound AsynchronousServerSocketChannel.
before it can be used to accept ziti client connections it has to be bound to Ziti service via any standard AsynchronousServerSocketChannel.bind method with ZitiAddress.Bind address all standard AsynchronousServerSocketChannel.accept methods are supported.
Example:
val server = zitiCtx.openServer() server.bind(ZitiAddress.Service(serviceName)) // start accepting val clt = service.accept().get()
-
isMFAEnrolled
abstract Boolean isMFAEnrolled()
-
authenticateMFA
abstract Unit authenticateMFA(String code)
-
enrollMFA
abstract MFAEnrollment enrollMFA()
-
enrollMFAAsync
abstract CompletionStage<MFAEnrollment> enrollMFAAsync()
-
verifyMFAAsync
abstract CompletionStage<Unit> verifyMFAAsync(String code)
-
removeMFAAsync
abstract CompletionStage<Unit> removeMFAAsync(String code)
-
getMFARecoveryCodes
abstract Array<String> getMFARecoveryCodes(String code, Boolean newCodes)
-
getMFARecoveryCodesAsync
abstract CompletionStage<Array<String>> getMFARecoveryCodesAsync(String code, Boolean newCodes)
-
-
-
-