Class SIPBasicAuthTokenExtractor
- java.lang.Object
-
- de.ikor.sip.foundation.security.authentication.basic.SIPBasicAuthTokenExtractor
-
- All Implemented Interfaces:
SIPTokenExtractor<SIPBasicAuthAuthenticationToken>
public class SIPBasicAuthTokenExtractor extends Object implements SIPTokenExtractor<SIPBasicAuthAuthenticationToken>
Token extractor for getting username and password from the Basic Authentication header.- Author:
- thomas.stieglmaier
-
-
Constructor Summary
Constructors Constructor Description SIPBasicAuthTokenExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SIPBasicAuthAuthenticationTokenextract(javax.servlet.http.HttpServletRequest request)Extracts a token of the given type from a request.Class<SIPBasicAuthAuthenticationToken>getTokenType()The type of the token to be extracted
-
-
-
Method Detail
-
extract
public SIPBasicAuthAuthenticationToken extract(javax.servlet.http.HttpServletRequest request)
Description copied from interface:SIPTokenExtractorExtracts a token of the given type from a request. Implementations of this method should throwBadCredentialsExceptionin case necessary token was not found, or had an invalid format, for proper mapping of the response status code (401 Unauthorized). Other exceptions will be mapped to internal server error.- Specified by:
extractin interfaceSIPTokenExtractor<SIPBasicAuthAuthenticationToken>- Parameters:
request- the request the token should be extracted from- Returns:
- the extracted token
-
getTokenType
public Class<SIPBasicAuthAuthenticationToken> getTokenType()
Description copied from interface:SIPTokenExtractorThe type of the token to be extracted- Specified by:
getTokenTypein interfaceSIPTokenExtractor<SIPBasicAuthAuthenticationToken>- Returns:
- the token type
-
-