Package de.fmui.osb.broker
Class BasicAuthCredentials
- java.lang.Object
-
- de.fmui.osb.broker.RequestCredentials
-
- de.fmui.osb.broker.BasicAuthCredentials
-
public class BasicAuthCredentials extends RequestCredentials
Basic Authentication credentials.
-
-
Constructor Summary
Constructors Constructor Description BasicAuthCredentials(javax.servlet.http.HttpServletRequest request, java.lang.String username, java.lang.String password)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BasicAuthCredentials
createCredentialsFromRequest(javax.servlet.http.HttpServletRequest request)
Creates aBasicAuthCredentials
object if the request has basic auth credentials.java.lang.String
getPassword()
Returns the password.java.lang.String
getUsername()
Returns the user name.boolean
isBasicAuthentication()
Returns if basic authentication is used.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class de.fmui.osb.broker.RequestCredentials
getHttpServletRequest, isTokenAuthentication
-
-
-
-
Method Detail
-
isBasicAuthentication
public boolean isBasicAuthentication()
Description copied from class:RequestCredentials
Returns if basic authentication is used.- Overrides:
isBasicAuthentication
in classRequestCredentials
- Returns:
true
if basic authentication is used,false
otherwise
-
getUsername
public java.lang.String getUsername()
Returns the user name.- Returns:
- the user name
-
getPassword
public java.lang.String getPassword()
Returns the password.- Returns:
- the password
-
createCredentialsFromRequest
public static BasicAuthCredentials createCredentialsFromRequest(javax.servlet.http.HttpServletRequest request)
Creates aBasicAuthCredentials
object if the request has basic auth credentials.- Parameters:
request
- the HTTP request object- Returns:
- a
BasicAuthCredentials
ornull
if the request does not contain basic auth credentials
-
-