Class ParameterExtractor
java.lang.Object
org.pac4j.core.credentials.extractor.ParameterExtractor
- All Implemented Interfaces:
CredentialsExtractor
To extract a parameter value.
- Since:
- 1.8.0
- Author:
- Jerome Leleu
-
Constructor Summary
ConstructorsConstructorDescriptionParameterExtractor(String parameterName) ParameterExtractor(String parameterName, boolean supportGetRequest, boolean supportPostRequest) -
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.toString()
-
Constructor Details
-
ParameterExtractor
-
ParameterExtractor
public ParameterExtractor(String parameterName, boolean supportGetRequest, boolean supportPostRequest)
-
-
Method Details
-
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)
-
toString
-