Search in sources :

Example 1 with Type

use of io.gravitee.am.common.event.Type in project gravitee-access-management by gravitee-io.

the class ScopeServiceImpl method delete.

@Override
public Completable delete(String scopeId, boolean force, User principal) {
    LOGGER.debug("Delete scope {}", scopeId);
    return scopeRepository.findById(scopeId).switchIfEmpty(Maybe.error(new ScopeNotFoundException(scopeId))).flatMapSingle(scope -> {
        if (scope.isSystem() && !force) {
            throw new SystemScopeDeleteException(scopeId);
        }
        return Single.just(scope);
    }).flatMapCompletable(scope -> Completable.fromSingle(// 1_ Remove permissions from role
    roleService.findByDomain(scope.getDomain()).flatMapObservable(roles -> Observable.fromIterable(roles.stream().filter(role -> role.getOauthScopes() != null && role.getOauthScopes().contains(scope.getKey())).collect(Collectors.toList()))).flatMapSingle(role -> {
        role.getOauthScopes().remove(scope.getKey());
        UpdateRole updatedRole = new UpdateRole();
        updatedRole.setName(role.getName());
        updatedRole.setDescription(role.getDescription());
        updatedRole.setPermissions(role.getOauthScopes());
        // Save role
        return roleService.update(scope.getDomain(), role.getId(), updatedRole);
    }).toList()).andThen(// 2_ Remove scopes from application
    applicationService.findByDomain(scope.getDomain()).flatMapObservable(applications -> Observable.fromIterable(applications.stream().filter(application -> {
        if (application.getSettings() == null) {
            return false;
        }
        if (application.getSettings().getOauth() == null) {
            return false;
        }
        ApplicationOAuthSettings oAuthSettings = application.getSettings().getOauth();
        return oAuthSettings.getScopeSettings() != null && !oAuthSettings.getScopeSettings().stream().filter(s -> s.getScope().equals(scope.getKey())).findFirst().isEmpty();
    }).collect(Collectors.toList()))).flatMapSingle(application -> {
        // Remove scope from application
        final List<ApplicationScopeSettings> cleanScopes = application.getSettings().getOauth().getScopeSettings().stream().filter(s -> !s.getScope().equals(scope.getKey())).collect(Collectors.toList());
        application.getSettings().getOauth().setScopeSettings(cleanScopes);
        // Then update
        return applicationService.update(application);
    }).toList()).toCompletable().andThen(scopeApprovalRepository.deleteByDomainAndScopeKey(scope.getDomain(), scope.getKey())).andThen(scopeRepository.delete(scopeId)).andThen(Completable.fromSingle(eventService.create(new Event(Type.SCOPE, new Payload(scope.getId(), ReferenceType.DOMAIN, scope.getDomain(), Action.DELETE))))).doOnComplete(() -> auditService.report(AuditBuilder.builder(ScopeAuditBuilder.class).principal(principal).type(EventType.SCOPE_DELETED).scope(scope))).doOnError(throwable -> auditService.report(AuditBuilder.builder(ScopeAuditBuilder.class).principal(principal).type(EventType.SCOPE_DELETED).throwable(throwable)))).onErrorResumeNext(ex -> {
        if (ex instanceof AbstractManagementException) {
            return Completable.error(ex);
        }
        LOGGER.error("An error occurs while trying to delete scope: {}", scopeId, ex);
        return Completable.error(new TechnicalManagementException(String.format("An error occurs while trying to delete scope: %s", scopeId), ex));
    });
}
Also used : java.util(java.util) Completable(io.reactivex.Completable) Maybe(io.reactivex.Maybe) LoggerFactory(org.slf4j.LoggerFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) Single(io.reactivex.Single) Event(io.gravitee.am.model.common.event.Event) Type(io.gravitee.am.common.event.Type) io.gravitee.am.service.exception(io.gravitee.am.service.exception) User(io.gravitee.am.identityprovider.api.User) AuditBuilder(io.gravitee.am.service.reporter.builder.AuditBuilder) ReferenceType(io.gravitee.am.model.ReferenceType) Observable(io.reactivex.Observable) URI(java.net.URI) Scope(io.gravitee.am.model.oauth2.Scope) io.gravitee.am.service(io.gravitee.am.service) Action(io.gravitee.am.common.event.Action) Page(io.gravitee.am.model.common.Page) Logger(org.slf4j.Logger) ApplicationOAuthSettings(io.gravitee.am.model.application.ApplicationOAuthSettings) MalformedURLException(java.net.MalformedURLException) ScopeRepository(io.gravitee.am.repository.management.api.ScopeRepository) EventType(io.gravitee.am.common.audit.EventType) Collectors(java.util.stream.Collectors) RandomString(io.gravitee.am.common.utils.RandomString) io.gravitee.am.service.model(io.gravitee.am.service.model) Component(org.springframework.stereotype.Component) Payload(io.gravitee.am.model.common.event.Payload) ApplicationScopeSettings(io.gravitee.am.model.application.ApplicationScopeSettings) ScopeAuditBuilder(io.gravitee.am.service.reporter.builder.management.ScopeAuditBuilder) Lazy(org.springframework.context.annotation.Lazy) ScopeApprovalRepository(io.gravitee.am.repository.oauth2.api.ScopeApprovalRepository) ApplicationOAuthSettings(io.gravitee.am.model.application.ApplicationOAuthSettings) ApplicationScopeSettings(io.gravitee.am.model.application.ApplicationScopeSettings) Event(io.gravitee.am.model.common.event.Event) Payload(io.gravitee.am.model.common.event.Payload) ScopeAuditBuilder(io.gravitee.am.service.reporter.builder.management.ScopeAuditBuilder)

Example 2 with Type

use of io.gravitee.am.common.event.Type in project gravitee-access-management by gravitee-io.

the class RoleServiceImpl method upsert.

private Completable upsert(Role role) {
    return roleRepository.findByNameAndAssignableType(role.getReferenceType(), role.getReferenceId(), role.getName(), role.getAssignableType()).map(Optional::ofNullable).defaultIfEmpty(Optional.empty()).flatMapCompletable(optRole -> {
        if (!optRole.isPresent()) {
            LOGGER.debug("Create a system role {}", role.getAssignableType() + ":" + role.getName());
            role.setCreatedAt(new Date());
            role.setUpdatedAt(role.getCreatedAt());
            return roleRepository.create(role).flatMap(role1 -> {
                Event event = new Event(Type.ROLE, new Payload(role1.getId(), role1.getReferenceType(), role1.getReferenceId(), Action.CREATE));
                return eventService.create(event).flatMap(__ -> Single.just(role1));
            }).onErrorResumeNext(ex -> {
                if (ex instanceof AbstractManagementException) {
                    return Single.error(ex);
                }
                LOGGER.error("An error occurs while trying to create a system role {}", role.getAssignableType() + ":" + role.getName(), ex);
                return Single.error(new TechnicalManagementException("An error occurs while trying to create a role", ex));
            }).doOnSuccess(role1 -> auditService.report(AuditBuilder.builder(RoleAuditBuilder.class).type(EventType.ROLE_CREATED).role(role1))).doOnError(throwable -> auditService.report(AuditBuilder.builder(RoleAuditBuilder.class).type(EventType.ROLE_CREATED).throwable(throwable))).toCompletable();
        } else {
            // check if permission set has changed
            Role currentRole = optRole.get();
            if (permissionsAreEquals(currentRole, role)) {
                return Completable.complete();
            }
            LOGGER.debug("Update a system role {}", role.getAssignableType() + ":" + role.getName());
            // update the role
            role.setId(currentRole.getId());
            role.setPermissionAcls(role.getPermissionAcls());
            role.setUpdatedAt(new Date());
            return roleRepository.update(role).flatMap(role1 -> {
                Event event = new Event(Type.ROLE, new Payload(role1.getId(), role1.getReferenceType(), role1.getReferenceId(), Action.UPDATE));
                return eventService.create(event).flatMap(__ -> Single.just(role1));
            }).onErrorResumeNext(ex -> {
                if (ex instanceof AbstractManagementException) {
                    return Single.error(ex);
                }
                LOGGER.error("An error occurs while trying to update a system role {}", role.getAssignableType() + ":" + role.getName(), ex);
                return Single.error(new TechnicalManagementException("An error occurs while trying to update a role", ex));
            }).doOnSuccess(role1 -> auditService.report(AuditBuilder.builder(RoleAuditBuilder.class).type(EventType.ROLE_UPDATED).oldValue(currentRole).role(role1))).doOnError(throwable -> auditService.report(AuditBuilder.builder(RoleAuditBuilder.class).type(EventType.ROLE_UPDATED).throwable(throwable))).toCompletable();
        }
    });
}
Also used : java.util(java.util) SystemRole(io.gravitee.am.model.permissions.SystemRole) Role(io.gravitee.am.model.Role) Permission(io.gravitee.am.model.permissions.Permission) LoggerFactory(org.slf4j.LoggerFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) AuditService(io.gravitee.am.service.AuditService) Platform(io.gravitee.am.model.Platform) Event(io.gravitee.am.model.common.event.Event) Type(io.gravitee.am.common.event.Type) io.gravitee.am.service.exception(io.gravitee.am.service.exception) Acl(io.gravitee.am.model.Acl) User(io.gravitee.am.identityprovider.api.User) AuditBuilder(io.gravitee.am.service.reporter.builder.AuditBuilder) NewRole(io.gravitee.am.service.model.NewRole) ReferenceType(io.gravitee.am.model.ReferenceType) EventService(io.gravitee.am.service.EventService) Observable(io.reactivex.Observable) io.reactivex(io.reactivex) RoleService(io.gravitee.am.service.RoleService) Action(io.gravitee.am.common.event.Action) Page(io.gravitee.am.model.common.Page) Logger(org.slf4j.Logger) RoleAuditBuilder(io.gravitee.am.service.reporter.builder.management.RoleAuditBuilder) DefaultRole(io.gravitee.am.model.permissions.DefaultRole) EventType(io.gravitee.am.common.audit.EventType) Collectors(java.util.stream.Collectors) RandomString(io.gravitee.am.common.utils.RandomString) RoleRepository(io.gravitee.am.repository.management.api.RoleRepository) UpdateRole(io.gravitee.am.service.model.UpdateRole) Component(org.springframework.stereotype.Component) Payload(io.gravitee.am.model.common.event.Payload) Lazy(org.springframework.context.annotation.Lazy) RoleAuditBuilder(io.gravitee.am.service.reporter.builder.management.RoleAuditBuilder) SystemRole(io.gravitee.am.model.permissions.SystemRole) Role(io.gravitee.am.model.Role) NewRole(io.gravitee.am.service.model.NewRole) DefaultRole(io.gravitee.am.model.permissions.DefaultRole) UpdateRole(io.gravitee.am.service.model.UpdateRole) Event(io.gravitee.am.model.common.event.Event) Payload(io.gravitee.am.model.common.event.Payload)

Example 3 with Type

use of io.gravitee.am.common.event.Type in project gravitee-access-management by gravitee-io.

the class EmailTemplateServiceImpl method create0.

private Single<Email> create0(ReferenceType referenceType, String referenceId, String client, NewEmail newEmail, User principal) {
    String emailId = RandomString.generate();
    // check if email is unique
    return checkEmailUniqueness(referenceType, referenceId, client, newEmail.getTemplate().template()).flatMap(irrelevant -> {
        Email email = new Email();
        email.setId(emailId);
        email.setReferenceType(referenceType);
        email.setReferenceId(referenceId);
        email.setClient(client);
        email.setEnabled(newEmail.isEnabled());
        email.setTemplate(newEmail.getTemplate().template());
        email.setFrom(newEmail.getFrom());
        email.setFromName(newEmail.getFromName());
        email.setSubject(newEmail.getSubject());
        email.setContent(newEmail.getContent());
        email.setExpiresAfter(newEmail.getExpiresAfter());
        email.setCreatedAt(new Date());
        email.setUpdatedAt(email.getCreatedAt());
        return emailRepository.create(email);
    }).flatMap(email -> {
        // create event for sync process
        Event event = new Event(Type.EMAIL, new Payload(email.getId(), email.getReferenceType(), email.getReferenceId(), Action.CREATE));
        return eventService.create(event).flatMap(__ -> Single.just(email));
    }).onErrorResumeNext(ex -> {
        if (ex instanceof AbstractManagementException) {
            return Single.error(ex);
        }
        LOGGER.error("An error occurs while trying to create a email", ex);
        return Single.error(new TechnicalManagementException("An error occurs while trying to create a email", ex));
    }).doOnSuccess(email -> auditService.report(AuditBuilder.builder(EmailTemplateAuditBuilder.class).principal(principal).type(EventType.EMAIL_TEMPLATE_CREATED).email(email))).doOnError(throwable -> auditService.report(AuditBuilder.builder(EmailTemplateAuditBuilder.class).principal(principal).type(EventType.EMAIL_TEMPLATE_CREATED).throwable(throwable)));
}
Also used : EmailAlreadyExistsException(io.gravitee.am.service.exception.EmailAlreadyExistsException) Date(java.util.Date) Completable(io.reactivex.Completable) Maybe(io.reactivex.Maybe) LoggerFactory(org.slf4j.LoggerFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) AuditService(io.gravitee.am.service.AuditService) Single(io.reactivex.Single) Event(io.gravitee.am.model.common.event.Event) Type(io.gravitee.am.common.event.Type) TechnicalManagementException(io.gravitee.am.service.exception.TechnicalManagementException) Flowable(io.reactivex.Flowable) User(io.gravitee.am.identityprovider.api.User) AuditBuilder(io.gravitee.am.service.reporter.builder.AuditBuilder) ReferenceType(io.gravitee.am.model.ReferenceType) EventService(io.gravitee.am.service.EventService) Email(io.gravitee.am.model.Email) Action(io.gravitee.am.common.event.Action) Logger(org.slf4j.Logger) EmailTemplateService(io.gravitee.am.service.EmailTemplateService) EventType(io.gravitee.am.common.audit.EventType) AbstractManagementException(io.gravitee.am.service.exception.AbstractManagementException) RandomString(io.gravitee.am.common.utils.RandomString) EmailTemplateAuditBuilder(io.gravitee.am.service.reporter.builder.management.EmailTemplateAuditBuilder) UpdateEmail(io.gravitee.am.service.model.UpdateEmail) NewEmail(io.gravitee.am.service.model.NewEmail) Component(org.springframework.stereotype.Component) Template(io.gravitee.am.model.Template) Payload(io.gravitee.am.model.common.event.Payload) EmailNotFoundException(io.gravitee.am.service.exception.EmailNotFoundException) EmailRepository(io.gravitee.am.repository.management.api.EmailRepository) Lazy(org.springframework.context.annotation.Lazy) AbstractManagementException(io.gravitee.am.service.exception.AbstractManagementException) Email(io.gravitee.am.model.Email) UpdateEmail(io.gravitee.am.service.model.UpdateEmail) NewEmail(io.gravitee.am.service.model.NewEmail) EmailTemplateAuditBuilder(io.gravitee.am.service.reporter.builder.management.EmailTemplateAuditBuilder) Event(io.gravitee.am.model.common.event.Event) Payload(io.gravitee.am.model.common.event.Payload) RandomString(io.gravitee.am.common.utils.RandomString) Date(java.util.Date) TechnicalManagementException(io.gravitee.am.service.exception.TechnicalManagementException)

Example 4 with Type

use of io.gravitee.am.common.event.Type in project gravitee-access-management by gravitee-io.

the class GroupServiceImpl method create.

@Override
public Single<Group> create(ReferenceType referenceType, String referenceId, NewGroup newGroup, io.gravitee.am.identityprovider.api.User principal) {
    LOGGER.debug("Create a new group {} for {} {}", newGroup.getName(), referenceType, referenceId);
    return findByName(referenceType, referenceId, newGroup.getName()).isEmpty().map(isEmpty -> {
        if (!isEmpty) {
            throw new GroupAlreadyExistsException(newGroup.getName());
        } else {
            String groupId = RandomString.generate();
            Group group = new Group();
            group.setId(groupId);
            group.setReferenceType(referenceType);
            group.setReferenceId(referenceId);
            group.setName(newGroup.getName());
            group.setDescription(newGroup.getDescription());
            group.setMembers(newGroup.getMembers());
            group.setCreatedAt(new Date());
            group.setUpdatedAt(group.getCreatedAt());
            return group;
        }
    }).flatMap(this::setMembers).flatMap(group -> groupRepository.create(group)).flatMap(group -> {
        Event event = new Event(Type.GROUP, new Payload(group.getId(), group.getReferenceType(), group.getReferenceId(), Action.CREATE));
        return eventService.create(event).flatMap(__ -> Single.just(group));
    }).onErrorResumeNext(ex -> {
        if (ex instanceof AbstractManagementException) {
            return Single.error(ex);
        } else {
            LOGGER.error("An error occurs while trying to create a group", ex);
            return Single.error(new TechnicalManagementException("An error occurs while trying to create a group", ex));
        }
    }).doOnSuccess(group -> auditService.report(AuditBuilder.builder(GroupAuditBuilder.class).principal(principal).type(EventType.GROUP_CREATED).group(group))).doOnError(throwable -> auditService.report(AuditBuilder.builder(GroupAuditBuilder.class).principal(principal).type(EventType.GROUP_CREATED).throwable(throwable)));
}
Also used : Date(java.util.Date) Completable(io.reactivex.Completable) Role(io.gravitee.am.model.Role) Maybe(io.reactivex.Maybe) LoggerFactory(org.slf4j.LoggerFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) Single(io.reactivex.Single) Event(io.gravitee.am.model.common.event.Event) GroupAuditBuilder(io.gravitee.am.service.reporter.builder.management.GroupAuditBuilder) Type(io.gravitee.am.common.event.Type) io.gravitee.am.service.exception(io.gravitee.am.service.exception) Flowable(io.reactivex.Flowable) AuditBuilder(io.gravitee.am.service.reporter.builder.AuditBuilder) ReferenceType(io.gravitee.am.model.ReferenceType) User(io.gravitee.am.model.User) Group(io.gravitee.am.model.Group) io.gravitee.am.service(io.gravitee.am.service) Action(io.gravitee.am.common.event.Action) Page(io.gravitee.am.model.common.Page) Logger(org.slf4j.Logger) EventType(io.gravitee.am.common.audit.EventType) UpdateGroup(io.gravitee.am.service.model.UpdateGroup) Collectors(java.util.stream.Collectors) RandomString(io.gravitee.am.common.utils.RandomString) Objects(java.util.Objects) Component(org.springframework.stereotype.Component) List(java.util.List) Payload(io.gravitee.am.model.common.event.Payload) NewGroup(io.gravitee.am.service.model.NewGroup) Optional(java.util.Optional) Lazy(org.springframework.context.annotation.Lazy) GroupRepository(io.gravitee.am.repository.management.api.GroupRepository) Group(io.gravitee.am.model.Group) UpdateGroup(io.gravitee.am.service.model.UpdateGroup) NewGroup(io.gravitee.am.service.model.NewGroup) GroupAuditBuilder(io.gravitee.am.service.reporter.builder.management.GroupAuditBuilder) Event(io.gravitee.am.model.common.event.Event) Payload(io.gravitee.am.model.common.event.Payload) RandomString(io.gravitee.am.common.utils.RandomString) Date(java.util.Date)

Example 5 with Type

use of io.gravitee.am.common.event.Type in project gravitee-access-management by gravitee-io.

the class DeviceIdentifierServiceImpl method create.

@Override
public Single<DeviceIdentifier> create(String domain, NewDeviceIdentifier newDeviceIdentifier, User principal) {
    LOGGER.debug("Create a new device identifier {} for domain {}", newDeviceIdentifier, domain);
    DeviceIdentifier deviceIdentifier = new DeviceIdentifier();
    deviceIdentifier.setId(newDeviceIdentifier.getId() == null ? RandomString.generate() : newDeviceIdentifier.getId());
    deviceIdentifier.setReferenceId(domain);
    deviceIdentifier.setReferenceType(ReferenceType.DOMAIN);
    deviceIdentifier.setName(newDeviceIdentifier.getName());
    deviceIdentifier.setType(newDeviceIdentifier.getType());
    deviceIdentifier.setConfiguration(newDeviceIdentifier.getConfiguration());
    deviceIdentifier.setCreatedAt(new Date());
    deviceIdentifier.setUpdatedAt(deviceIdentifier.getCreatedAt());
    return deviceIdentifierRepository.create(deviceIdentifier).flatMap(rd -> {
        // create event for sync process
        Event event = new Event(Type.DEVICE_IDENTIFIER, new Payload(rd.getId(), rd.getReferenceType(), rd.getReferenceId(), Action.CREATE));
        return eventService.create(event).flatMap(__ -> Single.just(rd));
    }).onErrorResumeNext(ex -> {
        if (ex instanceof AbstractManagementException) {
            return Single.error(ex);
        }
        LOGGER.error("An error occurs while trying to create a device identifier", ex);
        return Single.error(new TechnicalManagementException("An error occurs while trying to create a device identifier", ex));
    }).doOnSuccess(detection -> auditService.report(AuditBuilder.builder(DeviceIdentifierAuditBuilder.class).principal(principal).type(EventType.DEVICE_IDENTIFIER_CREATED).deviceIdentifier(detection))).doOnError(throwable -> auditService.report(AuditBuilder.builder(DeviceIdentifierAuditBuilder.class).principal(principal).type(EventType.DEVICE_IDENTIFIER_CREATED).throwable(throwable)));
}
Also used : Date(java.util.Date) NewDeviceIdentifier(io.gravitee.am.service.model.NewDeviceIdentifier) Completable(io.reactivex.Completable) Maybe(io.reactivex.Maybe) LoggerFactory(org.slf4j.LoggerFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) DeviceIdentifierRepository(io.gravitee.am.repository.management.api.DeviceIdentifierRepository) AuditService(io.gravitee.am.service.AuditService) Single(io.reactivex.Single) Event(io.gravitee.am.model.common.event.Event) Type(io.gravitee.am.common.event.Type) TechnicalManagementException(io.gravitee.am.service.exception.TechnicalManagementException) Flowable(io.reactivex.Flowable) User(io.gravitee.am.identityprovider.api.User) UpdateDeviceIdentifier(io.gravitee.am.service.model.UpdateDeviceIdentifier) AuditBuilder(io.gravitee.am.service.reporter.builder.AuditBuilder) ReferenceType(io.gravitee.am.model.ReferenceType) EventService(io.gravitee.am.service.EventService) Action(io.gravitee.am.common.event.Action) Logger(org.slf4j.Logger) DeviceIdentifierAuditBuilder(io.gravitee.am.service.reporter.builder.management.DeviceIdentifierAuditBuilder) EventType(io.gravitee.am.common.audit.EventType) AbstractManagementException(io.gravitee.am.service.exception.AbstractManagementException) RandomString(io.gravitee.am.common.utils.RandomString) DeviceIdentifier(io.gravitee.am.model.DeviceIdentifier) Component(org.springframework.stereotype.Component) Payload(io.gravitee.am.model.common.event.Payload) DeviceIdentifierService(io.gravitee.am.service.DeviceIdentifierService) DeviceIdentifierNotFoundException(io.gravitee.am.service.exception.DeviceIdentifierNotFoundException) Lazy(org.springframework.context.annotation.Lazy) DeviceIdentifierAuditBuilder(io.gravitee.am.service.reporter.builder.management.DeviceIdentifierAuditBuilder) AbstractManagementException(io.gravitee.am.service.exception.AbstractManagementException) Event(io.gravitee.am.model.common.event.Event) Payload(io.gravitee.am.model.common.event.Payload) Date(java.util.Date) TechnicalManagementException(io.gravitee.am.service.exception.TechnicalManagementException) NewDeviceIdentifier(io.gravitee.am.service.model.NewDeviceIdentifier) UpdateDeviceIdentifier(io.gravitee.am.service.model.UpdateDeviceIdentifier) DeviceIdentifier(io.gravitee.am.model.DeviceIdentifier)

Aggregations

EventType (io.gravitee.am.common.audit.EventType)17 Action (io.gravitee.am.common.event.Action)17 Type (io.gravitee.am.common.event.Type)17 Event (io.gravitee.am.model.common.event.Event)17 Payload (io.gravitee.am.model.common.event.Payload)17 AuditBuilder (io.gravitee.am.service.reporter.builder.AuditBuilder)17 Lazy (org.springframework.context.annotation.Lazy)17 Component (org.springframework.stereotype.Component)17 ReferenceType (io.gravitee.am.model.ReferenceType)16 RandomString (io.gravitee.am.common.utils.RandomString)15 Logger (org.slf4j.Logger)15 LoggerFactory (org.slf4j.LoggerFactory)15 Autowired (org.springframework.beans.factory.annotation.Autowired)15 User (io.gravitee.am.identityprovider.api.User)14 Completable (io.reactivex.Completable)12 Maybe (io.reactivex.Maybe)12 Single (io.reactivex.Single)12 AuditService (io.gravitee.am.service.AuditService)11 Flowable (io.reactivex.Flowable)10 Collectors (java.util.stream.Collectors)10