Class QDLHeadersClaimsSource
- java.lang.Object
-
- org.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
-
- org.oa4mp.server.loader.oauth2.claims.QDLHeadersClaimsSource
-
- All Implemented Interfaces:
Serializable,org.oa4mp.delegation.server.server.claims.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 StringPREFIX_KEYstatic StringREGEX_KEY-
Fields inherited from class org.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
groupHandler
-
-
Constructor Summary
Constructors Constructor Description QDLHeadersClaimsSource()QDLHeadersClaimsSource(org.oa4mp.delegation.server.server.claims.ClaimSourceConfiguration configuration)QDLHeadersClaimsSource(org.qdl_lang.variables.QDLStem stem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfromQDL(org.qdl_lang.variables.QDLStem arg)OA2StategetOa2State()StringgetPrefix()StringgetRegex()booleanhasOA2State()booleanisRegex()booleanisRunOnlyAtAuthorization()This should usually be false.net.sf.json.JSONObjectprocess(net.sf.json.JSONObject claims, org.oa4mp.delegation.server.ServiceTransaction transaction)At the most basic level, this just returns theUserInfoobject passed to it.protected net.sf.json.JSONObjectrealProcessing(net.sf.json.JSONObject claims, javax.servlet.http.HttpServletRequest request, org.oa4mp.delegation.server.ServiceTransaction transaction)Note that this will filter as a prefix or as a regex depending on the configuration.voidsetOa2State(OA2State oa2State)voidsetPrefix(String prefix)voidsetRegex(String regex)org.qdl_lang.variables.QDLStemtoQDL()-
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(org.oa4mp.delegation.server.server.claims.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, org.oa4mp.delegation.server.ServiceTransaction transaction) throws org.oa4mp.delegation.server.server.UnsupportedScopeExceptionNote 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:
realProcessingin classBasicClaimsSourceImpl- Parameters:
claims-request-transaction-- Returns:
- Throws:
org.oa4mp.delegation.server.server.UnsupportedScopeException
-
process
public net.sf.json.JSONObject process(net.sf.json.JSONObject claims, org.oa4mp.delegation.server.ServiceTransaction transaction) throws org.oa4mp.delegation.server.server.UnsupportedScopeExceptionDescription copied from class:BasicClaimsSourceImplAt the most basic level, this just returns theUserInfoobject passed to it. Override as you deem fit.- Specified by:
processin interfaceorg.oa4mp.delegation.server.server.claims.ClaimSource- Overrides:
processin classBasicClaimsSourceImpl- Throws:
org.oa4mp.delegation.server.server.UnsupportedScopeException
-
isRunOnlyAtAuthorization
public boolean isRunOnlyAtAuthorization()
Description copied from class:BasicClaimsSourceImplThis 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:
isRunOnlyAtAuthorizationin interfaceorg.oa4mp.delegation.server.server.claims.ClaimSource- Overrides:
isRunOnlyAtAuthorizationin classBasicClaimsSourceImpl
-
toQDL
public org.qdl_lang.variables.QDLStem toQDL()
- Specified by:
toQDLin interfaceorg.oa4mp.delegation.server.server.claims.ClaimSource- Overrides:
toQDLin classBasicClaimsSourceImpl
-
fromQDL
public void fromQDL(org.qdl_lang.variables.QDLStem arg)
- Specified by:
fromQDLin interfaceorg.oa4mp.delegation.server.server.claims.ClaimSource- Overrides:
fromQDLin classBasicClaimsSourceImpl
-
-