Class ClaimsSourceGetter
- java.lang.Object
-
- org.oa4mp.server.loader.oauth2.claims.qdl.ClaimsSourceGetter
-
- All Implemented Interfaces:
CSConstants
,edu.uiuc.ncsa.qdl.extensions.QDLFunction
,Serializable
public class ClaimsSourceGetter extends Object implements edu.uiuc.ncsa.qdl.extensions.QDLFunction, CSConstants
QDLFunction to convert claims to a stem. For use in the OA4MP QDL module.Created by Jeff Gaynor
on 2/10/20 at 10:18 AM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
GET_CLAIMS_NAME
-
Fields inherited from interface edu.uiuc.ncsa.myproxy.oa4mp.qdl.claims.CSConstants
CS_CODE_JAVA_CLASS, CS_DEFAULT_CLAIM_NAME_KEY, CS_DEFAULT_FAIL_ON_ERROR, CS_DEFAULT_ID, CS_DEFAULT_ID_VALUE, CS_DEFAULT_IS_ENABLED, CS_DEFAULT_NAME, CS_DEFAULT_NOTIFY_ON_FAIL, CS_DEFAULT_TYPE, CS_FILE_CLAIM_KEY, CS_FILE_FILE_PATH, CS_FILE_STEM_CLAIMS, CS_HEADERS_PREFIX, CS_LDAP_ADDITIONAL_FILTER, CS_LDAP_AUTHZ_TYPE, CS_LDAP_CONTEXT_NAME, CS_LDAP_GROUP_NAMES, CS_LDAP_LISTS, CS_LDAP_PASSWORD, CS_LDAP_PORT, CS_LDAP_RENAME, CS_LDAP_SEARCH_ATTRIBUTES, CS_LDAP_SEARCH_BASE, CS_LDAP_SEARCH_FILTER_ATTRIBUTE, CS_LDAP_SEARCH_NAME, CS_LDAP_SEARCH_SCOPE, CS_LDAP_SECURITY_PRINCIPAL, CS_LDAP_SERVER_ADDRESS, CS_TYPE_BASIC, CS_TYPE_CODE, CS_TYPE_FILE, CS_TYPE_HEADERS, CS_TYPE_LDAP, CS_TYPE_NCSA, CS_USE_DEFAULT_KEY
-
-
Constructor Summary
Constructors Constructor Description ClaimsSourceGetter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected edu.uiuc.ncsa.qdl.variables.QDLStem
claimsToStem(net.sf.json.JSONObject claims)
It is a bit hard to convert from stems to claims, so this does it.protected edu.uiuc.ncsa.qdl.variables.QDLStem
doCode(edu.uiuc.ncsa.qdl.variables.QDLStem arg, String username, edu.uiuc.ncsa.qdl.variables.QDLStem headers, edu.uiuc.ncsa.qdl.state.State state)
protected edu.uiuc.ncsa.qdl.variables.QDLStem
doFS(edu.uiuc.ncsa.qdl.variables.QDLStem arg, String username, edu.uiuc.ncsa.qdl.state.State state)
Note that this needs to send a transaction to theFSClaimSource
, so it creates one and sets the user name.edu.uiuc.ncsa.qdl.variables.QDLStem
doHeaders(edu.uiuc.ncsa.qdl.variables.QDLStem arg, String username, edu.uiuc.ncsa.qdl.variables.QDLStem headers, edu.uiuc.ncsa.qdl.state.State state)
protected edu.uiuc.ncsa.qdl.variables.QDLStem
doNCSA(edu.uiuc.ncsa.qdl.variables.QDLStem arg, String username, edu.uiuc.ncsa.qdl.state.State state)
Object
evaluate(Object[] objects, edu.uiuc.ncsa.qdl.state.State state)
int[]
getArgCount()
protected ConfigtoCS
getConfigToCS()
List<String>
getDocumentation(int argCount)
String
getName()
static void
main(String[] args)
protected static void
testFS()
protected static void
testLDAP()
protected static void
testLDAP2()
protected static void
testNCSA()
-
-
-
Field Detail
-
GET_CLAIMS_NAME
public static final String GET_CLAIMS_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceedu.uiuc.ncsa.qdl.extensions.QDLFunction
-
getArgCount
public int[] getArgCount()
- Specified by:
getArgCount
in interfaceedu.uiuc.ncsa.qdl.extensions.QDLFunction
-
getConfigToCS
protected ConfigtoCS getConfigToCS()
-
evaluate
public Object evaluate(Object[] objects, edu.uiuc.ncsa.qdl.state.State state)
- Specified by:
evaluate
in interfaceedu.uiuc.ncsa.qdl.extensions.QDLFunction
-
doCode
protected edu.uiuc.ncsa.qdl.variables.QDLStem doCode(edu.uiuc.ncsa.qdl.variables.QDLStem arg, String username, edu.uiuc.ncsa.qdl.variables.QDLStem headers, edu.uiuc.ncsa.qdl.state.State state)
-
doNCSA
protected edu.uiuc.ncsa.qdl.variables.QDLStem doNCSA(edu.uiuc.ncsa.qdl.variables.QDLStem arg, String username, edu.uiuc.ncsa.qdl.state.State state)
-
doHeaders
public edu.uiuc.ncsa.qdl.variables.QDLStem doHeaders(edu.uiuc.ncsa.qdl.variables.QDLStem arg, String username, edu.uiuc.ncsa.qdl.variables.QDLStem headers, edu.uiuc.ncsa.qdl.state.State state)
-
claimsToStem
protected edu.uiuc.ncsa.qdl.variables.QDLStem claimsToStem(net.sf.json.JSONObject claims)
It is a bit hard to convert from stems to claims, so this does it.- Parameters:
claims
-- Returns:
-
doFS
protected edu.uiuc.ncsa.qdl.variables.QDLStem doFS(edu.uiuc.ncsa.qdl.variables.QDLStem arg, String username, edu.uiuc.ncsa.qdl.state.State state)
Note that this needs to send a transaction to theFSClaimSource
, so it creates one and sets the user name. Practically then theCSConstants.CS_FILE_CLAIM_KEY
then is ignored, since the function accepts the username directly.- Parameters:
arg
-username
-state
-- Returns:
-
testFS
protected static void testFS()
-
testLDAP2
protected static void testLDAP2()
-
testNCSA
protected static void testNCSA()
-
testLDAP
protected static void testLDAP()
-
main
public static void main(String[] args)
-
-