Class SIPBasicAuthAuthenticationToken
java.lang.Object
one.x1f.sip.foundation.security.authentication.SIPAuthenticationToken<SIPBasicAuthAuthenticationToken>
one.x1f.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
ConstructorsConstructorDescriptionSIPBasicAuthAuthenticationToken(@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 one.x1f.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:
getCredentialsin interfaceorg.springframework.security.core.Authentication- Overrides:
getCredentialsin classSIPAuthenticationToken<SIPBasicAuthAuthenticationToken>
-
getPrincipal
-
withAuthenticated
Description copied from class:SIPAuthenticationTokenReturns a new instance of the same authentication object, but with the specified value for the authenticated field.- Specified by:
withAuthenticatedin 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
-