SsoServerAuthSvcImpl.java revision c0ecdea37538b10f2b7f0c4906949925664f8711
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: SsoServerAuthSvcImpl.java,v 1.2 2009/10/21 00:02:10 bigfatrat Exp $
*
*/
/*
* Portions Copyrighted 2011-13 ForgeRock Inc.
*/
/**
* This class extends the "SsoServerAuthSvc" class.
*/
public class SsoServerAuthSvcImpl extends SsoServerAuthSvc {
/*
* This is the interval over which the authehticate rate will be averaged
* in seconds
*/
private long interval;
private long frequency;
private static long DEFAULT_INTERVAL = 3600;
private static int MINIMUM_FREQUENCY = 250;
private static int AVERAGE_RECORD_COUNT = 1000;
/**
* Constructors
*/
super(myMib);
}
/**
* Constructor
*/
}
}
try {
} catch (NumberFormatException nfe) {
}
} else {
}
if (debug.messageEnabled()) {
}
}
/*
Update both success and failure rates at the same time
*/
protected void updateSsoServerAuthenticationRates() {
// if our checkpoint is stale, replace it with a new one
}
// remove success records that are older than the interval we're interested in
}
// remove failure records that are older than the interval we're interested in
}
// get count of successful and failed logins
// if there are no logins then assign 0 so we don't divide by 0
if (total == 0) {
} else {
// make the addition of both rates == 100
} else {
}
}
}
}
/*
* need a method to create auth module entries
*/
/*
*/
public void incSsoServerAuthenticationFailureCount() {
li++;
}
public void incSsoServerAuthenticationSuccessCount() {
li++;
}
/**
* incrementer for all auth modules' "commits" and "aborts", with
* orgDN
*/
{
"SsoServerAuthSvcImpl.incModuleCounter:";
/*
* given the orgDN and module's name, need to get the corresponding
* entry in the auth modules' table.
*
* the orgDN must be converted to the realm name ("/"-separated)
* then can get the realm's index into its Table
*/
if (debug.messageEnabled()) {
" orgDN = " + orgDN);
}
if (debug.messageEnabled()) {
orgDN + " set up yet.");
}
return;
}
if (debug.warningEnabled()) {
"did not find auth module instance for " + moduleName +
" in realm " + rName);
}
return;
}
if (debug.messageEnabled()) {
}
if (success) {
} else {
}
} else {
if (debug.warningEnabled()) {
}
}
}
}