Package org.springframework.boot.actuate.audit

Examples of org.springframework.boot.actuate.audit.AuditEvent


        }

        List<AuditEvent> auditEvents = new ArrayList<>();

        for (PersistentAuditEvent persistentAuditEvent : persistentAuditEvents) {
            AuditEvent auditEvent = new AuditEvent(persistentAuditEvent.getAuditEventDate().toDate(), persistentAuditEvent.getPrincipal(),
                    persistentAuditEvent.getAuditEventType(), convertDataToObjects(persistentAuditEvent.getData()));
            auditEvents.add(auditEvent);
        }

        return auditEvents;
View Full Code Here


        }

        List<AuditEvent> auditEvents = new ArrayList<>();

        for (PersistentAuditEvent persistentAuditEvent : persistentAuditEvents) {
            AuditEvent auditEvent = new AuditEvent(persistentAuditEvent.getAuditEventDate().toDate(), persistentAuditEvent.getPrincipal(),
                    persistentAuditEvent.getAuditEventType(), convertDataToObjects(persistentAuditEvent.getData()));
            auditEvents.add(auditEvent);
        }

        return auditEvents;
View Full Code Here

   * Create a new {@link AuditApplicationEvent} that wraps a newly created
   * {@link AuditEvent}.
   * @see AuditEvent#AuditEvent(String, String, Map)
   */
  public AuditApplicationEvent(String principal, String type, Map<String, Object> data) {
    this(new AuditEvent(principal, type, data));
  }
View Full Code Here

   * Create a new {@link AuditApplicationEvent} that wraps a newly created
   * {@link AuditEvent}.
   * @see AuditEvent#AuditEvent(String, String, String...)
   */
  public AuditApplicationEvent(String principal, String type, String... data) {
    this(new AuditEvent(principal, type, data));
  }
View Full Code Here

   * {@link AuditEvent}.
   * @see AuditEvent#AuditEvent(Date, String, String, Map)
   */
  public AuditApplicationEvent(Date timestamp, String principal, String type,
      Map<String, Object> data) {
    this(new AuditEvent(timestamp, principal, type, data));
  }
View Full Code Here

  private void onAuthenticationFailureEvent(AbstractAuthenticationFailureEvent event) {
    Map<String, Object> data = new HashMap<String, Object>();
    data.put("type", event.getException().getClass().getName());
    data.put("message", event.getException().getMessage());
    publish(new AuditEvent(event.getAuthentication().getName(),
        "AUTHENTICATION_FAILURE", data));
  }
View Full Code Here

  private void onAuthenticationEvent(AbstractAuthenticationEvent event) {
    Map<String, Object> data = new HashMap<String, Object>();
    if (event.getAuthentication().getDetails() != null) {
      data.put("details", event.getAuthentication().getDetails());
    }
    publish(new AuditEvent(event.getAuthentication().getName(),
        "AUTHENTICATION_SUCCESS", data));
  }
View Full Code Here

        Map<String, Object> data = new HashMap<String, Object>();
        if (event.getAuthentication().getDetails() != null) {
          data.put("details", event.getAuthentication().getDetails());
        }
        data.put("target", event.getTargetUser().getUsername());
        listener.publish(new AuditEvent(event.getAuthentication().getName(),
            "AUTHENTICATION_SWITCH", data));
      }

    }
View Full Code Here

  private void onAuthenticationCredentialsNotFoundEvent(
      AuthenticationCredentialsNotFoundEvent event) {
    Map<String, Object> data = new HashMap<String, Object>();
    data.put("type", event.getCredentialsNotFoundException().getClass().getName());
    data.put("message", event.getCredentialsNotFoundException().getMessage());
    publish(new AuditEvent("<unknown>", "AUTHENTICATION_FAILURE", data));
  }
View Full Code Here

  private void onAuthorizationFailureEvent(AuthorizationFailureEvent event) {
    Map<String, Object> data = new HashMap<String, Object>();
    data.put("type", event.getAccessDeniedException().getClass().getName());
    data.put("message", event.getAccessDeniedException().getMessage());
    publish(new AuditEvent(event.getAuthentication().getName(),
        "AUTHORIZATION_FAILURE", data));
  }
View Full Code Here

TOP

Related Classes of org.springframework.boot.actuate.audit.AuditEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.