java.lang.Object
org.apache.jena.fuseki.main.auth.SimpleBearer
Support for bearer authentication token of the form
Bearer: base64("user:NAME")
. This is unsafe if believed without further
checking but for tests and development it provides a mode whereby the deployment
authentication machinery isn't needed.
,p>
Usage:
new AuthBearerFilter(SimpleBearer::getUserFromToken64);
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getUserFromAuthHeader
(String headerValue) Get the user name from a "user:" bearer token which not in base64 encoded plain text.static String
getUserFromToken64
(String b64token) Decode a base64 string and get the user name assuming the "user:" form.static String
Create the header string setting for bearer auth in the "user:" scheme.static String
Create the header string setting for bearer auth in the "user:" scheme.
-
Field Details
-
USER_PREFIX
-
-
Constructor Details
-
SimpleBearer
public SimpleBearer()
-
-
Method Details
-
requestAuthorizationToken
Create the header string setting for bearer auth in the "user:" scheme. The result is for the form"base64chars"
. -
requestAuthorizationHeader
Create the header string setting for bearer auth in the "user:" scheme. The result is for the form"Bearer base64chars"
. -
getUserFromAuthHeader
Get the user name from a "user:" bearer token which not in base64 encoded plain text.- See Also:
-
getUserFromToken64
Decode a base64 string and get the user name assuming the "user:" form.
-