Interface IUsersApi
-
public interface IUsersApiHigh-level methods for authenticating and authorizing a user and retrieving details about a user.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IUserPortalResponse<List<de.xima.fc.api.rest.pub.client.user_portal.model.BaseAuthenticatorResource>>authenticatorsByPortal(IUserPortalInvocationContext ctx, UUID portalUuid)Retrieves all available authenticators for a user portal.IUserPortalResponse<Path>downloadProfileImage(IUserPortalInvocationContext ctx)Retrieves the profile image of the currently authenticated user.IUserPortalResponse<de.xima.fc.api.rest.pub.client.security.model.MfaSettingsResponse>getMfaSettings(IUserPortalInvocationContext ctx)Retrieves the multi-factor authentication (MFA) settings.IUserPortalResponse<de.xima.fc.api.rest.pub.client.user.model.DetailedUserProfileResource>getProfile(IUserPortalInvocationContext ctx)Retrieves the profile of the currently authenticated user.IUserPortalResponse<de.xima.fc.api.rest.pub.client.security.model.AuthenticationTokenResponse>login(IUserPortalInvocationContext ctx, de.xima.fc.api.rest.pub.client.user_portal.model.BaseAuthenticatorResource client, String username, String password)Authenticates a user and returns the user.IUserPortalResponse<de.xima.fc.api.rest.pub.client.security.model.AuthenticationTokenResponse>login(IUserPortalInvocationContext ctx, String clientName, String username, String password)Authenticates a user and returns the user.IUserPortalResponse<de.xima.fc.api.rest.pub.client.security.model.MfaTempTokenResponse>sendEmailCode(IUserPortalInvocationContext ctx, String token)Sends an email with a code for multi-factor authentication (MFA) to the user.IUserPortalResponse<de.xima.fc.api.rest.pub.client.security.model.MfaVerificationResponse>verifyMfa(IUserPortalInvocationContext ctx, String code, String token, boolean saveMfaOption)Verifies a multi-factor authentication (MFA) code for the currently authenticated user.
-
-
-
Method Detail
-
authenticatorsByPortal
IUserPortalResponse<List<de.xima.fc.api.rest.pub.client.user_portal.model.BaseAuthenticatorResource>> authenticatorsByPortal(IUserPortalInvocationContext ctx, UUID portalUuid)
Retrieves all available authenticators for a user portal.- Parameters:
ctx- Invocation context for communicating with the user portal REST API.portalUuid- The UUID of a user portal.- Returns:
- A list of authenticators.
-
login
IUserPortalResponse<de.xima.fc.api.rest.pub.client.security.model.AuthenticationTokenResponse> login(IUserPortalInvocationContext ctx, String clientName, String username, String password)
Authenticates a user and returns the user. Throws when the user could not be authenticated.- Parameters:
ctx- Invocation context for communicating with the user portal REST API.clientName- The name of the authenticator client to use.username- The username of the user.password- The password of the user.- Returns:
- the authenticated user.
-
login
IUserPortalResponse<de.xima.fc.api.rest.pub.client.security.model.AuthenticationTokenResponse> login(IUserPortalInvocationContext ctx, de.xima.fc.api.rest.pub.client.user_portal.model.BaseAuthenticatorResource client, String username, String password)
Authenticates a user and returns the user. Throws when the user could not be authenticated.- Parameters:
ctx- Invocation context for communicating with the user portal REST API.client- The authenticator client to use.username- The username of the user.password- The password of the user.- Returns:
- the authenticated user.
-
getProfile
IUserPortalResponse<de.xima.fc.api.rest.pub.client.user.model.DetailedUserProfileResource> getProfile(IUserPortalInvocationContext ctx)
Retrieves the profile of the currently authenticated user.- Parameters:
ctx- Invocation context for communicating with the user portal REST API.- Returns:
- The detailed user profile resource.
-
downloadProfileImage
IUserPortalResponse<Path> downloadProfileImage(IUserPortalInvocationContext ctx)
Retrieves the profile image of the currently authenticated user.- Parameters:
ctx- Invocation context for communicating with the user portal REST API.- Returns:
- The path to the profile image.
-
verifyMfa
IUserPortalResponse<de.xima.fc.api.rest.pub.client.security.model.MfaVerificationResponse> verifyMfa(IUserPortalInvocationContext ctx, String code, String token, boolean saveMfaOption)
Verifies a multi-factor authentication (MFA) code for the currently authenticated user.- Parameters:
ctx- Invocation context for communicating with the user portal REST API.code- The MFA code to verify, typically received via email or an authenticator app.token- The MFA token received during the authentication process.- Returns:
- The response indicating whether the MFA verification was successful or not.
-
sendEmailCode
IUserPortalResponse<de.xima.fc.api.rest.pub.client.security.model.MfaTempTokenResponse> sendEmailCode(IUserPortalInvocationContext ctx, String token)
Sends an email with a code for multi-factor authentication (MFA) to the user.- Parameters:
ctx- Invocation context for communicating with the user portal REST API.token- The MFA token received during the authentication process.- Returns:
- The response containing the temporary token for MFA or an error if the operation failed.
-
getMfaSettings
IUserPortalResponse<de.xima.fc.api.rest.pub.client.security.model.MfaSettingsResponse> getMfaSettings(IUserPortalInvocationContext ctx)
Retrieves the multi-factor authentication (MFA) settings.- Parameters:
ctx- Invocation context for communicating with the user portal REST API.- Returns:
- The response containing the MFA settings or an error if the operation failed.
-
-