Package org.ehrbase.tenant
Class DefaultTenantAuthentication
- java.lang.Object
-
- org.springframework.security.authentication.AbstractAuthenticationToken
-
- org.ehrbase.tenant.DefaultTenantAuthentication
-
- All Implemented Interfaces:
Serializable,Principal,TenantAuthentication<String>,org.springframework.security.core.Authentication,org.springframework.security.core.CredentialsContainer
public class DefaultTenantAuthentication extends org.springframework.security.authentication.AbstractAuthenticationToken implements TenantAuthentication<String>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringTENANT_CLAIM-
Fields inherited from interface org.ehrbase.api.tenant.TenantAuthentication
DEFAULT_TENANT_ID
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthentication()ObjectgetCredentials()ObjectgetPrincipal()StringgetTenantId()static <T> DefaultTenantAuthenticationof(String tenantId)static <T> DefaultTenantAuthenticationof(TenantAuthentication<T> auth)static <T> DefaultTenantAuthenticationofToken(String token)-
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
-
-
-
-
Field Detail
-
TENANT_CLAIM
public static final String TENANT_CLAIM
- See Also:
- Constant Field Values
-
-
Method Detail
-
of
public static <T> DefaultTenantAuthentication of(TenantAuthentication<T> auth)
-
of
public static <T> DefaultTenantAuthentication of(String tenantId)
-
ofToken
public static <T> DefaultTenantAuthentication ofToken(String token)
-
getTenantId
public String getTenantId()
- Specified by:
getTenantIdin interfaceTenantAuthentication<String>
-
getCredentials
public Object getCredentials()
- Specified by:
getCredentialsin interfaceorg.springframework.security.core.Authentication
-
getPrincipal
public Object getPrincipal()
- Specified by:
getPrincipalin interfaceorg.springframework.security.core.Authentication
-
getAuthentication
public String getAuthentication()
- Specified by:
getAuthenticationin interfaceTenantAuthentication<String>
-
-