java.lang.Object
org.apache.jena.http.auth.AuthHeader
Parser for authentication header strings for both challenge and credentials.
- This parser is scheme-specific. e.g. digest credentials can not be token68.
- This parser does not check auth-params names.
- The auth-params map has lower case keys.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthHeader
bearerToken
(String tokenString) Create an AuthHeader for bearer with a token value.Get the string after the auth scheme as written in the authentication header value.Any auth scheme value that has a=b auth-params, else null.Get theAuthScheme
.Get the auth scheme as written in the authentication header value.Return user-password (still base64 encoded) or null (if not basic auth)The rest of the line for "unknown"boolean
Is this basic auth?boolean
Is this Bearer auth?boolean
Is this Digest auth?boolean
Is this some unknown scheme?static AuthHeader
Create an AuthHeader by parsing an "Authorization" header.static AuthHeader
parseChallenge
(String string) Create an AuthHeader by parsing a "WWW-Authenticate" header.toString()
-
Method Details
-
parseAuth
Create an AuthHeader by parsing an "Authorization" header. -
parseChallenge
Create an AuthHeader by parsing a "WWW-Authenticate" header. -
bearerToken
Create an AuthHeader for bearer with a token value. -
getAuthScheme
Get theAuthScheme
. -
getAuthSchemeName
Get the auth scheme as written in the authentication header value. -
getAuthArgs
Get the string after the auth scheme as written in the authentication header value. -
getAuthParams
Any auth scheme value that has a=b auth-params, else null. -
isBasicAuth
public boolean isBasicAuth()Is this basic auth? -
getBasicUserPassword
Return user-password (still base64 encoded) or null (if not basic auth) -
isDigestAuth
public boolean isDigestAuth()Is this Digest auth? The digest auth-params are available fromgetAuthParams()
-
isBearerAuth
public boolean isBearerAuth()Is this Bearer auth? -
getBearerToken
-
isUnknownAuth
public boolean isUnknownAuth()Is this some unknown scheme? (not basic, digest or bearer). The rest of the line is available fromgetUnknown()
. -
getUnknown
The rest of the line for "unknown" -
toString
-