Class BearerAuthExtractor
- java.lang.Object
-
- org.pac4j.core.credentials.extractor.BearerAuthExtractor
-
- All Implemented Interfaces:
CredentialsExtractor
public class BearerAuthExtractor extends java.lang.Object implements CredentialsExtractor
To extract an RFC 6750 bearer auth header.- Since:
- 3.5.0
- Author:
- Graham Leggett
-
-
Constructor Summary
Constructors Constructor Description BearerAuthExtractor()
BearerAuthExtractor(java.lang.String headerName, java.lang.String prefixHeader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<Credentials>
extract(WebContext context, SessionStore sessionStore)
Extract theCredentials
from aWebContext
and returnOptional.empty()
if no credentials are present or throw aCredentialsException
if it cannot get it.
-
-
-
Method Detail
-
extract
public java.util.Optional<Credentials> extract(WebContext context, SessionStore sessionStore)
Description copied from interface:CredentialsExtractor
Extract theCredentials
from aWebContext
and returnOptional.empty()
if no credentials are present or throw aCredentialsException
if it cannot get it.- Specified by:
extract
in interfaceCredentialsExtractor
- Parameters:
context
- the current web contextsessionStore
- the session store- Returns:
- the credentials (optional)
-
-