Skip to content
Permalink
Browse files

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

  • Loading branch information
jglick committed Jun 12, 2014
1 parent 65b7d8a commit 6dd071eaa8dd20ac6734d1b54e05d0a4adb7599f
Showing with 8 additions and 2 deletions.
  1. +3 −0 changelog.html
  2. +5 −2 core/src/main/java/jenkins/security/SecurityListener.java
@@ -58,6 +58,9 @@
<li class=rfe>
Jenkins can now kill Win32 processes from Win64 JVMs.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-23410">issue 23410</a>)
<li class=rfe>
Allow custom security realm plugins to fire events to <code>SecurityListener</code>s.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-23417">issue 23417</a>)
<li class=bug>
Recover gracefully if a build permalink has a non-numeric value.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-21631">issue 21631</a>)
@@ -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 6dd071e

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