Class LoginModuleMonitorImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.security.authentication.monitor.LoginModuleMonitorImpl
-
- All Implemented Interfaces:
LoginModuleMBean
,LoginModuleMonitor
,Monitor<LoginModuleMonitor>
public class LoginModuleMonitorImpl extends Object implements LoginModuleMBean, LoginModuleMonitor
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.spi.security.authentication.LoginModuleMBean
NAME, TYPE
-
Fields inherited from interface org.apache.jackrabbit.oak.spi.security.authentication.LoginModuleMonitor
NOOP
-
-
Constructor Summary
Constructors Constructor Description LoginModuleMonitorImpl(@NotNull StatisticsProvider statisticsProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getLoginErrors()
CompositeData
getLoginErrorsHistory()
void
loginError()
Event to be called in the case there is an error in the login chain.void
loginFailed(@NotNull LoginException loginException, @Nullable Credentials credentials)
Marks a failed login attempt for the givenCredentials
that resulted in the givenLoginException
.void
principalsCollected(long timeTakenNanos, int numberOfPrincipals)
Record the time taken to collect the given number of principals during the commit phase of a givenLoginModule
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.oak.spi.security.authentication.LoginModuleMonitor
getMonitorClass, getMonitorProperties
-
-
-
-
Constructor Detail
-
LoginModuleMonitorImpl
public LoginModuleMonitorImpl(@NotNull @NotNull StatisticsProvider statisticsProvider)
-
-
Method Detail
-
loginError
public void loginError()
Description copied from interface:LoginModuleMonitor
Event to be called in the case there is an error in the login chain. This is not covering failed logins, but actual operational errors that probably need to be investigated. Any triggered event should have a corresponding error logged to make this investigation possible.- Specified by:
loginError
in interfaceLoginModuleMonitor
- See Also:
LoginModuleMonitor.loginFailed(LoginException, Credentials)
-
loginFailed
public void loginFailed(@NotNull @NotNull LoginException loginException, @Nullable @Nullable Credentials credentials)
Description copied from interface:LoginModuleMonitor
Marks a failed login attempt for the givenCredentials
that resulted in the givenLoginException
.- Specified by:
loginFailed
in interfaceLoginModuleMonitor
- Parameters:
loginException
- TheLoginException
raised by the failed login attempt.credentials
- The credentials used for login.
-
principalsCollected
public void principalsCollected(long timeTakenNanos, int numberOfPrincipals)
Description copied from interface:LoginModuleMonitor
Record the time taken to collect the given number of principals during the commit phase of a givenLoginModule
.- Specified by:
principalsCollected
in interfaceLoginModuleMonitor
- Parameters:
timeTakenNanos
- The time in nanosecondsnumberOfPrincipals
- The number of principals that were collected.
-
getLoginErrors
public long getLoginErrors()
- Specified by:
getLoginErrors
in interfaceLoginModuleMBean
-
getLoginErrorsHistory
public CompositeData getLoginErrorsHistory()
- Specified by:
getLoginErrorsHistory
in interfaceLoginModuleMBean
-
-