Class SIPBasicAuthAuthenticationToken
java.lang.Object
de.ikor.sip.foundation.security.authentication.SIPAuthenticationToken<SIPBasicAuthAuthenticationToken>
de.ikor.sip.foundation.security.authentication.basic.SIPBasicAuthAuthenticationToken
- All Implemented Interfaces:
Serializable
,Principal
,org.springframework.security.core.Authentication
public class SIPBasicAuthAuthenticationToken
extends SIPAuthenticationToken<SIPBasicAuthAuthenticationToken>
Container for username/password tokens in the sip authentication framework.
- Author:
- thomas.stieglmaier
- See Also:
-
Constructor Summary
ConstructorDescriptionSIPBasicAuthAuthenticationToken
(@NonNull String principal, @NonNull String credentials, boolean authenticated) Creates a basic auth token -
Method Summary
Modifier and TypeMethodDescriptionwithAuthenticated
(boolean authenticated) Returns a new instance of the same authentication object, but with the specified value for the authenticated field.Methods inherited from class de.ikor.sip.foundation.security.authentication.SIPAuthenticationToken
getAuthorities, getDetails, getName, isAuthenticated, setAuthenticated
-
Constructor Details
-
SIPBasicAuthAuthenticationToken
public SIPBasicAuthAuthenticationToken(@NonNull @NonNull String principal, @NonNull @NonNull String credentials, boolean authenticated) Creates a basic auth token- Parameters:
principal
- the username of the authorization headercredentials
- the password of the authorization headerauthenticated
- indicates if the token is authenticated or not
-
-
Method Details
-
getCredentials
- Specified by:
getCredentials
in interfaceorg.springframework.security.core.Authentication
- Overrides:
getCredentials
in classSIPAuthenticationToken<SIPBasicAuthAuthenticationToken>
-
getPrincipal
-
withAuthenticated
Description copied from class:SIPAuthenticationToken
Returns a new instance of the same authentication object, but with the specified value for the authenticated field.- Specified by:
withAuthenticated
in classSIPAuthenticationToken<SIPBasicAuthAuthenticationToken>
- Parameters:
authenticated
- indicates if the authentication object should be authenticated or not- Returns:
- a copy of the caller authentication object with the specific value for authentication set
-