Skip to content
Permalink
Browse files

[FIXED JENKINS-23417] Noting merge of #1277.

(cherry picked from commit 6dd071e)

Conflicts:
	changelog.html
  • Loading branch information
jglick authored and olivergondza committed Jul 3, 2014
1 parent 461e964 commit 7e1d848bfa4068dc58dfd58c6b387c54e1b871ae
Showing with 5 additions and 2 deletions.
  1. +5 −2 core/src/main/java/jenkins/security/SecurityListener.java
@@ -35,8 +35,6 @@
import jenkins.model.Jenkins;
import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.userdetails.UserDetails;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

/**
* Listener notified of various significant events related to security.
@@ -87,6 +85,7 @@
// TODO event for new user signed up (e.g. in HudsonPrivateSecurityRealm)
// TODO event for CAPTCHA failure

/** @since 1.569 */
public static void fireAuthenticated(@Nonnull UserDetails details) {
if (LOGGER.isLoggable(Level.FINE)) {
List<String> groups = new ArrayList<String>();
@@ -102,27 +101,31 @@ public static void fireAuthenticated(@Nonnull UserDetails details) {
}
}

/** @since 1.569 */
public static void fireFailedToAuthenticate(@Nonnull String username) {
LOGGER.log(Level.FINE, "failed to authenticate: {0}", username);
for (SecurityListener l : all()) {
l.failedToAuthenticate(username);
}
}

/** @since 1.569 */
public static void fireLoggedIn(@Nonnull String username) {
LOGGER.log(Level.FINE, "logged in: {0}", username);
for (SecurityListener l : all()) {
l.loggedIn(username);
}
}

/** @since 1.569 */
public static void fireFailedToLogIn(@Nonnull String username) {
LOGGER.log(Level.FINE, "failed to log in: {0}", username);
for (SecurityListener l : all()) {
l.failedToLogIn(username);
}
}

/** @since 1.569 */
public static void fireLoggedOut(@Nonnull String username) {
LOGGER.log(Level.FINE, "logged out: {0}", username);
for (SecurityListener l : all()) {

0 comments on commit 7e1d848

Please sign in to comment.
You can’t perform that action at this time.