Class HeaderExtractor
java.lang.Object
org.pac4j.core.credentials.extractor.HeaderExtractor
- All Implemented Interfaces:
CredentialsExtractor
To extract header value.
- Since:
- 1.8.0
- Author:
- Jerome Leleu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextract(WebContext context, SessionStore sessionStore) Extract theCredentialsfrom aWebContextand returnOptional.empty()if no credentials are present or throw aCredentialsExceptionif it cannot get it.booleanvoidsetHeaderName(String headerName) voidsetPrefixHeader(String prefixHeader) voidsetTrimValue(boolean trimValue)
-
Constructor Details
-
HeaderExtractor
public HeaderExtractor() -
HeaderExtractor
-
-
Method Details
-
getHeaderName
-
setHeaderName
-
getPrefixHeader
-
setPrefixHeader
-
isTrimValue
public boolean isTrimValue() -
setTrimValue
public void setTrimValue(boolean trimValue) -
extract
Description copied from interface:CredentialsExtractorExtract theCredentialsfrom aWebContextand returnOptional.empty()if no credentials are present or throw aCredentialsExceptionif it cannot get it.- Specified by:
extractin interfaceCredentialsExtractor- Parameters:
context- the current web contextsessionStore- the session store- Returns:
- the credentials (optional)
-