Package io.continual.iam.impl.common
Class ApiKeyAuthHelper
- java.lang.Object
-
- io.continual.iam.impl.common.ApiKeyAuthHelper
-
public class ApiKeyAuthHelper extends Object
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 Modifier and Type Field Description static StringkDefault_AuthLineHeaderstatic StringkDefault_DateLineHeaderstatic StringkDefault_MagicLineHeaderstatic StringkSetting_AuthLineHeaderstatic StringkSetting_DateLineHeaderstatic StringkSetting_MagicLineHeader
-
Constructor Summary
Constructors Constructor Description ApiKeyAuthHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ApiKeyCredentialreadApiKeyCredential(NvReadable settings, HeaderReader hr, String serviceName)Build an ApiKeyCredential from an inbound HTTP header.
-
-
-
Field Detail
-
kSetting_AuthLineHeader
public static final String kSetting_AuthLineHeader
- See Also:
- Constant Field Values
-
kSetting_DateLineHeader
public static final String kSetting_DateLineHeader
- See Also:
- Constant Field Values
-
kSetting_MagicLineHeader
public static final String kSetting_MagicLineHeader
- See Also:
- Constant Field Values
-
kDefault_AuthLineHeader
public static final String kDefault_AuthLineHeader
- See Also:
- Constant Field Values
-
kDefault_DateLineHeader
public static final String kDefault_DateLineHeader
- See Also:
- Constant Field Values
-
kDefault_MagicLineHeader
public static final String kDefault_MagicLineHeader
- See Also:
- Constant Field Values
-
-
Method Detail
-
readApiKeyCredential
public static ApiKeyCredential readApiKeyCredential(NvReadable 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.
-
-