Skip to Content
0
Former Member
Jun 08, 2005 at 08:21 PM

CallbackHandler of type CERTIFICATE

21 Views

Does anyone have any examples of using the CallbackHandler for type CERTIFICATE? I'm attempting to modify a LoginModule to examine the certificate sent by the client for some special processing, but I seem to always get a null pointer back. An example code snippet follows...

.
.
.
Callback[] callbacks new Callback[1];
callbacks[0] new HttpGetterCallback();

((HttpGetterCallback) callbacks[0]).setType(HttpCallback.CERTIFICATE);

try {
    callbackHandler.handle(callbacks);
    } catch (UnsupportedCallbackException e) {
	return false;
    } catch (IOException e) {
	throwUserLoginException(e, LoginExceptionDetails.IO_EXCEPTION);
    }
.
.
.

For some reason,

((HttpGetterCallback) callbacks[1]).getValue()

always returns null.