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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SIPBasicAuthAuthenticationToken(@NonNull String principal, @NonNull String credentials, boolean authenticated)Creates a basic auth token
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetCredentials()ObjectgetPrincipal()SIPBasicAuthAuthenticationTokenwithAuthenticated(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 Detail
-
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 Detail
-
getCredentials
public Object getCredentials()
- Specified by:
getCredentialsin interfaceorg.springframework.security.core.Authentication- Overrides:
getCredentialsin classSIPAuthenticationToken<SIPBasicAuthAuthenticationToken>
-
getPrincipal
public Object getPrincipal()
-
withAuthenticated
public SIPBasicAuthAuthenticationToken withAuthenticated(boolean authenticated)
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
-
-