Class SAMLAttributeClaimSource
- java.lang.Object
-
- org.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
-
- org.cilogon.oauth2.servlet.claims.SAMLAttributeClaimSource
-
- All Implemented Interfaces:
Serializable
,org.oa4mp.delegation.server.server.claims.ClaimSource
- Direct Known Subclasses:
SAMLAttrbuteClaimSource
public class SAMLAttributeClaimSource extends org.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
This will read SAML attributes that are sent in the header from the IDP then stored in an attribute that is sent. At the right time, this attribute is read and parsed into information about the user and returned as a set of claims. NOTE that this is created by introspection (hence the no arg constructor) and hence never seems to be used in the code base. Several clients, however, require it.Created by Jeff Gaynor
on 7/10/18 at 8:15 AM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
SHIBBOLETH_LIST_DELIMITER
String
SHIBBOLETH_MEMBER_OF_KEY
-
Constructor Summary
Constructors Constructor Description SAMLAttributeClaimSource()
SAMLAttributeClaimSource(org.oa4mp.server.loader.oauth2.OA2SE oa2SE)
SAMLAttributeClaimSource(org.qdl_lang.variables.QDLStem stem)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isRunOnlyAtAuthorization()
static void
main(String[] arg)
protected net.sf.json.JSONObject
newProcess(net.sf.json.JSONObject claims, org.oa4mp.delegation.server.ServiceTransaction transaction)
The assumption is that all attributes will be JSONArrays since SAML supports multi-valued attributes.protected net.sf.json.JSONObject
oldProcess(net.sf.json.JSONObject claims, org.oa4mp.delegation.server.ServiceTransaction transaction)
As of next release (4.1) we should be getting SAML attributes that have been parsed into JSON, so we do not need to do the parsing ourselves.net.sf.json.JSONObject
process(net.sf.json.JSONObject claims, javax.servlet.http.HttpServletRequest request, org.oa4mp.delegation.server.ServiceTransaction transaction)
net.sf.json.JSONObject
process(net.sf.json.JSONObject claims, org.oa4mp.delegation.server.ServiceTransaction transaction)
protected static void
test1()
protected static void
test2()
org.qdl_lang.variables.QDLStem
toQDL()
String
toString()
-
Methods inherited from class org.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
fromQDL, getClaims, getConfiguration, getGroupHandler, getOa2SE, getOmitList, getPostProcessor, getPreProcessor, getScopes, hasConfiguration, hasJSONPostProcessor, hasJSONPreProcessor, isEnabled, realProcessing, setConfiguration, setGroupHandler, setOa2SE, setOmitList, setScopes
-
-
-
-
Method Detail
-
process
public net.sf.json.JSONObject process(net.sf.json.JSONObject claims, org.oa4mp.delegation.server.ServiceTransaction transaction) throws org.oa4mp.delegation.server.server.UnsupportedScopeException
- Specified by:
process
in interfaceorg.oa4mp.delegation.server.server.claims.ClaimSource
- Overrides:
process
in classorg.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
- Throws:
org.oa4mp.delegation.server.server.UnsupportedScopeException
-
newProcess
protected net.sf.json.JSONObject newProcess(net.sf.json.JSONObject claims, org.oa4mp.delegation.server.ServiceTransaction transaction) throws org.oa4mp.delegation.server.server.UnsupportedScopeException
The assumption is that all attributes will be JSONArrays since SAML supports multi-valued attributes.
Update: CIL-532 requires eduPersonEntitlement support. After discussions, we have decided not to have pre-parsed JSON, but stick with theoldProcess(JSONObject, ServiceTransaction)
. This code should be kept for a bit in case we decide to change our minds, since it is debugged and works, but it may ultimately go away.- Parameters:
claims
-transaction
-- Returns:
- Throws:
org.oa4mp.delegation.server.server.UnsupportedScopeException
-
oldProcess
protected net.sf.json.JSONObject oldProcess(net.sf.json.JSONObject claims, org.oa4mp.delegation.server.ServiceTransaction transaction) throws org.oa4mp.delegation.server.server.UnsupportedScopeException
As of next release (4.1) we should be getting SAML attributes that have been parsed into JSON, so we do not need to do the parsing ourselves. Note that these attributes have been sent over out of band and stashed in aUser
attribute namedUser.getAttr_json()
, since the assumption is that this servlet is access through Apache (or some other web server) and therefore cannot have direct access to the secure headers.- Parameters:
claims
-transaction
-- Returns:
- Throws:
org.oa4mp.delegation.server.server.UnsupportedScopeException
-
process
public net.sf.json.JSONObject process(net.sf.json.JSONObject claims, javax.servlet.http.HttpServletRequest request, org.oa4mp.delegation.server.ServiceTransaction transaction) throws org.oa4mp.delegation.server.server.UnsupportedScopeException
- Specified by:
process
in interfaceorg.oa4mp.delegation.server.server.claims.ClaimSource
- Overrides:
process
in classorg.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
- Throws:
org.oa4mp.delegation.server.server.UnsupportedScopeException
-
isRunOnlyAtAuthorization
public boolean isRunOnlyAtAuthorization()
- Specified by:
isRunOnlyAtAuthorization
in interfaceorg.oa4mp.delegation.server.server.claims.ClaimSource
- Overrides:
isRunOnlyAtAuthorization
in classorg.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
-
main
public static void main(String[] arg)
-
toQDL
public org.qdl_lang.variables.QDLStem toQDL()
- Specified by:
toQDL
in interfaceorg.oa4mp.delegation.server.server.claims.ClaimSource
- Overrides:
toQDL
in classorg.oa4mp.server.loader.oauth2.claims.BasicClaimsSourceImpl
-
-