Class QDLHeadersClaimsSource
- java.lang.Object
-
- org.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
-
- org.oa4mp.server.loader.oauth2.claims.QDLHeadersClaimsSource
-
- All Implemented Interfaces:
Serializable
,ClaimSource
public class QDLHeadersClaimsSource extends BasicClaimsSourceImpl
This will return all the headers as a stem.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
PREFIX_KEY
static String
REGEX_KEY
-
Fields inherited from class org.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
groupHandler
-
-
Constructor Summary
Constructors Constructor Description QDLHeadersClaimsSource()
QDLHeadersClaimsSource(ClaimSourceConfiguration configuration)
QDLHeadersClaimsSource(org.qdl_lang.variables.QDLStem stem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fromQDL(org.qdl_lang.variables.QDLStem arg)
Deserialize this claim source from its QDL representation.OA2State
getOa2State()
String
getPrefix()
String
getRegex()
boolean
hasOA2State()
boolean
isRegex()
boolean
isRunOnlyAtAuthorization()
This should usually be false.net.sf.json.JSONObject
process(net.sf.json.JSONObject claims, ServiceTransaction transaction)
At the most basic level, this just returns theUserInfo
object passed to it.protected net.sf.json.JSONObject
realProcessing(net.sf.json.JSONObject claims, javax.servlet.http.HttpServletRequest request, ServiceTransaction transaction)
Note that this will filter as a prefix or as a regex depending on the configuration.void
setOa2State(OA2State oa2State)
void
setPrefix(String prefix)
void
setRegex(String regex)
org.qdl_lang.variables.QDLStem
toQDL()
Serialize this claim source to its QDL representation.-
Methods inherited from class org.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
addToStem, getClaims, getConfiguration, getGroupHandler, getOa2SE, getOmitList, getScopes, hasConfiguration, isEnabled, process, setConfiguration, setGroupHandler, setOa2SE, setOmitList, setScopes
-
-
-
-
Field Detail
-
PREFIX_KEY
public static final String PREFIX_KEY
- See Also:
- Constant Field Values
-
REGEX_KEY
public static final String REGEX_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
QDLHeadersClaimsSource
public QDLHeadersClaimsSource(ClaimSourceConfiguration configuration)
-
QDLHeadersClaimsSource
public QDLHeadersClaimsSource()
-
QDLHeadersClaimsSource
public QDLHeadersClaimsSource(org.qdl_lang.variables.QDLStem stem)
-
-
Method Detail
-
getPrefix
public String getPrefix()
-
setPrefix
public void setPrefix(String prefix)
-
isRegex
public boolean isRegex()
-
getRegex
public String getRegex()
-
setRegex
public void setRegex(String regex)
-
getOa2State
public OA2State getOa2State()
-
setOa2State
public void setOa2State(OA2State oa2State)
-
hasOA2State
public boolean hasOA2State()
-
realProcessing
protected net.sf.json.JSONObject realProcessing(net.sf.json.JSONObject claims, javax.servlet.http.HttpServletRequest request, ServiceTransaction transaction) throws UnsupportedScopeException
Note that this will filter as a prefix or as a regex depending on the configuration. Also, if a prefix, the prefix is removed, but if a regex, the key is not altered. Any found claims are added to the set of claims.- Overrides:
realProcessing
in classBasicClaimsSourceImpl
- Parameters:
claims
-request
-transaction
-- Returns:
- Throws:
UnsupportedScopeException
-
process
public net.sf.json.JSONObject process(net.sf.json.JSONObject claims, ServiceTransaction transaction) throws UnsupportedScopeException
Description copied from class:BasicClaimsSourceImpl
At the most basic level, this just returns theUserInfo
object passed to it. Override as you deem fit.- Specified by:
process
in interfaceClaimSource
- Overrides:
process
in classBasicClaimsSourceImpl
- Returns:
- Throws:
UnsupportedScopeException
-
isRunOnlyAtAuthorization
public boolean isRunOnlyAtAuthorization()
Description copied from class:BasicClaimsSourceImpl
This should usually be false. It is true only for those sources that can ONLY run at authorization, such asHTTPHeaderClaimsSource
, where the information is simply not available in later phases.- Specified by:
isRunOnlyAtAuthorization
in interfaceClaimSource
- Overrides:
isRunOnlyAtAuthorization
in classBasicClaimsSourceImpl
- Returns:
-
toQDL
public org.qdl_lang.variables.QDLStem toQDL()
Description copied from interface:ClaimSource
Serialize this claim source to its QDL representation.- Specified by:
toQDL
in interfaceClaimSource
- Overrides:
toQDL
in classBasicClaimsSourceImpl
- Returns:
-
fromQDL
public void fromQDL(org.qdl_lang.variables.QDLStem arg)
Description copied from interface:ClaimSource
Deserialize this claim source from its QDL representation.- Specified by:
fromQDL
in interfaceClaimSource
- Overrides:
fromQDL
in classBasicClaimsSourceImpl
-
-