Skip to content

Commit

Permalink
[FIXED JENKINS-23417] Noting merge of #1277.
Browse files Browse the repository at this point in the history
(cherry picked from commit 6dd071e)

Conflicts:
	changelog.html
  • Loading branch information
jglick authored and olivergondza committed Jul 3, 2014
1 parent 461e964 commit 7e1d848
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/main/java/jenkins/security/SecurityListener.java
Expand Up @@ -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.
Expand Down Expand Up @@ -87,6 +85,7 @@ public abstract class SecurityListener implements ExtensionPoint {
// 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>();
Expand All @@ -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()) {
Expand Down

0 comments on commit 7e1d848

Please sign in to comment.