Package io.strimzi.kafka.oauth.services
Class Principals
java.lang.Object
io.strimzi.kafka.oauth.services.Principals
An in-memory cache of 'sessions' and their associated principals.
Used to transfer the principal information between SASL authentication layer and PrincipalBuilder layer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.kafka.common.security.auth.KafkaPrincipalgetPrincipal(SaslServer srv) Get the new principal from the cachevoidputPrincipal(SaslServer srv, org.apache.kafka.common.security.auth.KafkaPrincipal principal) Put a new principal into the cache
-
Constructor Details
-
Principals
public Principals()
-
-
Method Details
-
putPrincipal
public void putPrincipal(SaslServer srv, org.apache.kafka.common.security.auth.KafkaPrincipal principal) Put a new principal into the cache- Parameters:
srv- a SaslServer instanceprincipal- a KafkaPrincipal
-
getPrincipal
Get the new principal from the cache- Parameters:
srv- a SaslServer principal- Returns:
- an associated KafkaPrincipal
-