Class HTTPHeaderClaimsSource
- java.lang.Object
-
- org.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
-
- org.oa4mp.server.loader.oauth2.claims.HTTPHeaderClaimsSource
-
- All Implemented Interfaces:
ClaimSource
,Serializable
public class HTTPHeaderClaimsSource extends BasicClaimsSourceImpl
This is for the specific case that claims are passed through the headers. Each starts with the caput and every claim with this caput is processed and added. E.g.OIDC_CLAIM_sub
sets the "sub" claim.Created by Jeff Gaynor
on 3/15/17 at 2:41 PM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description String
caput
static String
PREFIX_KEY
Name of the property that contains the prefix used by this source.-
Fields inherited from class edu.uiuc.ncsa.myproxy.oa4mp.oauth2.claims.BasicClaimsSourceImpl
groupHandler
-
-
Constructor Summary
Constructors Constructor Description HTTPHeaderClaimsSource()
HTTPHeaderClaimsSource(ClaimSourceConfiguration configuration)
HTTPHeaderClaimsSource(edu.uiuc.ncsa.qdl.variables.QDLStem stem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fromQDL(edu.uiuc.ncsa.qdl.variables.QDLStem arg)
String
getCaput()
boolean
isRunAtAuthorization()
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)
This is the actual place to put your code that only processes the claim source.void
setCaput(String caput)
edu.uiuc.ncsa.qdl.variables.QDLStem
toQDL()
-
Methods inherited from class edu.uiuc.ncsa.myproxy.oa4mp.oauth2.claims.BasicClaimsSourceImpl
getClaims, getConfiguration, getGroupHandler, getOa2SE, getOmitList, getPostProcessor, getPreProcessor, getScopes, hasConfiguration, hasJSONPostProcessor, hasJSONPreProcessor, isEnabled, process, setConfiguration, setGroupHandler, setOa2SE, setOmitList, setScopes
-
-
-
-
Field Detail
-
PREFIX_KEY
public static final String PREFIX_KEY
Name of the property that contains the prefix used by this source. The default is OIDC_CLAIM_ if this is not set.- See Also:
- Constant Field Values
-
caput
public String caput
-
-
Constructor Detail
-
HTTPHeaderClaimsSource
public HTTPHeaderClaimsSource(ClaimSourceConfiguration configuration)
-
HTTPHeaderClaimsSource
public HTTPHeaderClaimsSource()
-
HTTPHeaderClaimsSource
public HTTPHeaderClaimsSource(edu.uiuc.ncsa.qdl.variables.QDLStem stem)
-
-
Method Detail
-
getCaput
public String getCaput()
-
setCaput
public void setCaput(String caput)
-
realProcessing
protected net.sf.json.JSONObject realProcessing(net.sf.json.JSONObject claims, javax.servlet.http.HttpServletRequest request, ServiceTransaction transaction) throws UnsupportedScopeException
Description copied from class:BasicClaimsSourceImpl
This is the actual place to put your code that only processes the claim source. TheBasicClaimsSourceImpl.process(JSONObject, HttpServletRequest, ServiceTransaction)
calls wrap this and invoke the pre/post processor for you. Your code should take whatever metadata is for the user and add it to the claims object.- Overrides:
realProcessing
in classBasicClaimsSourceImpl
- 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
-
isRunAtAuthorization
public boolean isRunAtAuthorization()
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:
isRunAtAuthorization
in interfaceClaimSource
- Overrides:
isRunAtAuthorization
in classBasicClaimsSourceImpl
- Returns:
-
fromQDL
public void fromQDL(edu.uiuc.ncsa.qdl.variables.QDLStem arg)
- Specified by:
fromQDL
in interfaceClaimSource
- Overrides:
fromQDL
in classBasicClaimsSourceImpl
-
toQDL
public edu.uiuc.ncsa.qdl.variables.QDLStem toQDL()
- Specified by:
toQDL
in interfaceClaimSource
- Overrides:
toQDL
in classBasicClaimsSourceImpl
-
-