Package io.continual.iam.identity
Interface IdentityDb<I extends Identity>
-
- All Known Subinterfaces:
IamDb<I,G>,IdentityManager<I>
- All Known Implementing Classes:
CommonJsonDb,JsonDocDb
public interface IdentityDb<I extends Identity>An identity database, mainly for authenticating users.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iauthenticate(ApiKeyCredential akc)Authenticate with an API key and signatureIauthenticate(JwtCredential jwt)Authenticate with a JWT tokenIauthenticate(UsernamePasswordCredential upc)Authenticate with a username and passwordStringcreateJwtToken(Identity ii)Create a JWT token for the given identity.voidinvalidateJwtToken(String jwtToken)Invalidate the given JWT token
-
-
-
Method Detail
-
authenticate
I authenticate(UsernamePasswordCredential upc) throws IamSvcException
Authenticate with a username and password- Parameters:
upc- the username/password credential- Returns:
- an authenticated identity or null
- Throws:
IamSvcException- when the call cannot be completed due to a service error
-
authenticate
I authenticate(ApiKeyCredential akc) throws IamSvcException
Authenticate with an API key and signature- Parameters:
akc- the API key credential- Returns:
- an authenticated identity or null
- Throws:
IamSvcException- when the call cannot be completed due to a service error
-
authenticate
I authenticate(JwtCredential jwt) throws IamSvcException
Authenticate with a JWT token- Parameters:
jwt- the JWT credential- Returns:
- an authenticated identity or null
- Throws:
IamSvcException- when the call cannot be completed due to a service error
-
createJwtToken
String createJwtToken(Identity ii) throws IamSvcException
Create a JWT token for the given identity.- Parameters:
ii- an identity- Returns:
- a JWT token
- Throws:
IamSvcException- when the call cannot be completed due to a service error
-
invalidateJwtToken
void invalidateJwtToken(String jwtToken) throws IamSvcException
Invalidate the given JWT token- Parameters:
jwtToken- a JWT token- Throws:
IamSvcException- when the call cannot be completed due to a service error
-
-