Class IdentityController
java.lang.Object
com.irurueta.authserver.authorization.api.web.social.IdentityController
- All Implemented Interfaces:
IdentitiesApi
Manages the identities of external providers linked to the authenticated account (the operations of the contract).
Linking one is not here: it happens when the user signs in with the provider (the verified e-mail address, or the
provisioning of a new account), so the API lists and unlinks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CurrentAccountResolverResolves the account of the request.private final IdentityDtoMapperMaps the identities onto the contract's DTOs.private final ListIdentitiesUseCaseLists the identities of an account.private final StepUpGuardRequires a recent multi-factor sign-in before an identity is unlinked.private final UnlinkIdentityUseCaseUnlinks an identity.Fields inherited from interface com.irurueta.authserver.authorization.api.web.v1.generated.api.IdentitiesApi
PATH_LIST_IDENTITIES, PATH_UNLINK_IDENTITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLists the identities linked to the authenticated account.org.springframework.http.ResponseEntity<Void> unlinkIdentity(UUID id) Unlinks an identity of the authenticated account.
-
Field Details
-
currentAccountResolver
Resolves the account of the request. -
listIdentitiesUseCase
Lists the identities of an account. -
unlinkIdentityUseCase
Unlinks an identity. -
stepUpGuard
Requires a recent multi-factor sign-in before an identity is unlinked. -
identityDtoMapper
Maps the identities onto the contract's DTOs.
-
-
Constructor Details
-
IdentityController
public IdentityController()
-
-
Method Details
-
listIdentities
Lists the identities linked to the authenticated account.- Specified by:
listIdentitiesin interfaceIdentitiesApi- Returns:
200 OKwith the identities, possibly none.
-
unlinkIdentity
Unlinks an identity of the authenticated account.- Specified by:
unlinkIdentityin interfaceIdentitiesApi- Parameters:
id- identifier of the link.- Returns:
204 No Content.- Throws:
FederatedIdentityNotFoundException- if the account has no such identity.LastSignInMethodException- if the identity is the last way the account can sign in.InsufficientUserAuthenticationException- if the account has a confirmed second factor and the token does not show a recent multi-factor sign-in.
-