Package io.continual.iam.impl.common
Class ApiKeyAuthHelper
java.lang.Object
io.continual.iam.impl.common.ApiKeyAuthHelper
Web systems implementing RESTful APIs with API keys can use this helper class to
read API key authentication info from the inbound request.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ApiKeyCredentialreadApiKeyCredential(org.json.JSONObject settings, HeaderReader hr, String serviceName) Build an ApiKeyCredential from an inbound HTTP header.
-
Field Details
-
kSetting_AuthLineHeader
- See Also:
-
kSetting_DateLineHeader
- See Also:
-
kSetting_MagicLineHeader
- See Also:
-
kDefault_AuthLineHeader
- See Also:
-
kDefault_DateLineHeader
- See Also:
-
kDefault_MagicLineHeader
- See Also:
-
-
Constructor Details
-
ApiKeyAuthHelper
public ApiKeyAuthHelper()
-
-
Method Details
-
readApiKeyCredential
public static ApiKeyCredential readApiKeyCredential(org.json.JSONObject settings, HeaderReader hr, String serviceName) Build an ApiKeyCredential from an inbound HTTP header.- Parameters:
settings- a settings sourcehr- a header reader, to isolate web server tech from this classserviceName- the name of the service fpr signed content- Returns:
- an API key credential, or null if the header is malformed, etc.
-