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 StringPREFIX_KEYstatic StringREGEX_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 voidfromQDL(org.qdl_lang.variables.QDLStem arg)Deserialize this claim source from its QDL representation.OA2StategetOa2State()StringgetPrefix()StringgetRegex()booleanhasOA2State()booleanisRegex()booleanisRunOnlyAtAuthorization()This should usually be false.org.kordamp.json.JSONObjectprocess(org.kordamp.json.JSONObject claims, ServiceTransaction transaction)At the most basic level, this just returns theUserInfoobject passed to it.protected org.kordamp.json.JSONObjectrealProcessing(org.kordamp.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.voidsetOa2State(OA2State oa2State)voidsetPrefix(String prefix)voidsetRegex(String regex)org.qdl_lang.variables.QDLStemtoQDL()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 org.kordamp.json.JSONObject realProcessing(org.kordamp.json.JSONObject claims, javax.servlet.http.HttpServletRequest request, ServiceTransaction transaction) throws 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:
UnsupportedScopeException
-
process
public org.kordamp.json.JSONObject process(org.kordamp.json.JSONObject claims, ServiceTransaction transaction) throws UnsupportedScopeExceptionDescription copied from class:BasicClaimsSourceImplAt the most basic level, this just returns theUserInfoobject passed to it. Override as you deem fit.- Specified by:
processin interfaceClaimSource- Overrides:
processin classBasicClaimsSourceImpl- Returns:
- Throws:
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 interfaceClaimSource- Overrides:
isRunOnlyAtAuthorizationin classBasicClaimsSourceImpl- Returns:
-
toQDL
public org.qdl_lang.variables.QDLStem toQDL()
Description copied from interface:ClaimSourceSerialize this claim source to its QDL representation.- Specified by:
toQDLin interfaceClaimSource- Overrides:
toQDLin classBasicClaimsSourceImpl- Returns:
-
fromQDL
public void fromQDL(org.qdl_lang.variables.QDLStem arg)
Description copied from interface:ClaimSourceDeserialize this claim source from its QDL representation.- Specified by:
fromQDLin interfaceClaimSource- Overrides:
fromQDLin classBasicClaimsSourceImpl
-
-