Class InternalAuthTokenProvider
- java.lang.Object
-
- com.floragunn.searchguard.internalauthtoken.InternalAuthTokenProvider
-
- All Implemented Interfaces:
DynamicConfigFactory.DCFListener
public class InternalAuthTokenProvider extends Object implements DynamicConfigFactory.DCFListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInternalAuthTokenProvider.AuthFromInternalAuthToken
-
Field Summary
Fields Modifier and Type Field Description static StringAUDIENCE_HEADERstatic StringTOKEN_HEADER
-
Constructor Summary
Constructors Constructor Description InternalAuthTokenProvider(DynamicConfigFactory dynamicConfigFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.cxf.rs.security.jose.jwk.JsonWebKeygetEncryptionKey()StringgetJwt(User user, String aud)StringgetJwt(User user, String aud, TemporalAmount validity)org.apache.cxf.rs.security.jose.jwk.JsonWebKeygetSigningKey()voidonChanged(ConfigModel configModel, DynamicConfigModel dynamicConfigModel, InternalUsersModel internalUsersModel)voidsetEncryptionKey(String keyString)voidsetEncryptionKey(org.apache.cxf.rs.security.jose.jwk.JsonWebKey encryptionKey)voidsetSigningKey(String keyString)voidsetSigningKey(org.apache.cxf.rs.security.jose.jwk.JsonWebKey signingKey)InternalAuthTokenProvider.AuthFromInternalAuthTokenuserAuthFromToken(String authToken, String authTokenAudience)InternalAuthTokenProvider.AuthFromInternalAuthTokenuserAuthFromToken(org.elasticsearch.common.util.concurrent.ThreadContext threadContext)
-
-
-
Field Detail
-
TOKEN_HEADER
public static final String TOKEN_HEADER
- See Also:
- Constant Field Values
-
AUDIENCE_HEADER
public static final String AUDIENCE_HEADER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InternalAuthTokenProvider
public InternalAuthTokenProvider(DynamicConfigFactory dynamicConfigFactory)
-
-
Method Detail
-
getJwt
public String getJwt(User user, String aud) throws IllegalStateException
- Throws:
IllegalStateException
-
getJwt
public String getJwt(User user, String aud, TemporalAmount validity) throws IllegalStateException
- Throws:
IllegalStateException
-
userAuthFromToken
public InternalAuthTokenProvider.AuthFromInternalAuthToken userAuthFromToken(org.elasticsearch.common.util.concurrent.ThreadContext threadContext)
-
userAuthFromToken
public InternalAuthTokenProvider.AuthFromInternalAuthToken userAuthFromToken(String authToken, String authTokenAudience)
-
onChanged
public void onChanged(ConfigModel configModel, DynamicConfigModel dynamicConfigModel, InternalUsersModel internalUsersModel)
- Specified by:
onChangedin interfaceDynamicConfigFactory.DCFListener
-
getSigningKey
public org.apache.cxf.rs.security.jose.jwk.JsonWebKey getSigningKey()
-
setSigningKey
public void setSigningKey(org.apache.cxf.rs.security.jose.jwk.JsonWebKey signingKey)
-
setSigningKey
public void setSigningKey(String keyString)
-
getEncryptionKey
public org.apache.cxf.rs.security.jose.jwk.JsonWebKey getEncryptionKey()
-
setEncryptionKey
public void setEncryptionKey(org.apache.cxf.rs.security.jose.jwk.JsonWebKey encryptionKey)
-
setEncryptionKey
public void setEncryptionKey(String keyString)
-
-