RE: Any credential provider gurus out there?



GetSerialization is actual place where you will validate your data before
letting the control go back to windows.

if your authentication fails, you can use set control text functions to
display error message on the tile (small and large text fields etc)

Thats how I used it and I did all my validations in GetSerialization
functions (Implemented One Time Password Validation)







"Dana Epp [Security MVP]" wrote:

Hey guys,

I need some help. Hoping someone in the community has some experience with
writing Credential Providers in Vista or Windows Server 2008.

I have went through all the samples, and the very LITTLE documentation on
the topic in MSDN, and still not clear on a few things. I am hoping someone
could give me some pointers.

I am wrapping the password credential provider and adding an extra password
field. I have it set up so I can do my own password validation logic and
work with the extra field in GetSerialization() just fine. If I find that
the second password is invalid, I want to return a failure, and go to the
blank screen where it can say something like "Bad secondary password". I
would EXPECT this is done in ReportResult(). However, just what are you
supposed to do in GetSerialization() to fire off directly to ReportResult()
so I can output the error string I want? I thought I could do something
like:

*pcpsiOptionalStatusIcon = CPSI_ERROR;
*pcpgsr = CPGSR_RETURN_CREDENTIAL_FINISHED;
hr = ERROR_NOT_AUTHENTICATED;

Problem is it doesn't enter into ReportResult(). I don't want it to actually
call into the LSA* functions underneith. By not passing it down to the
wrapped CP, I assumed I could do the control I wanted.

Any ideas how to do that? Basically if during GetSerialization() I find a
failure, I want to show the results screen and put my error message up. I
don't seem to see any documentation on that. None of the samples cover this
scenario that I can see.

Any pointers to documentation or examples on how to do this would be greatly
appreciated.

Regards,
Dana

.



Relevant Pages

  • Re: Access 2007 Technical Questions
    ... If your users are encountering Validation ... Rules being exercised when the control loses focus, ... developer is responsible for handling this with VBA code. ... and allows queries instead of cursors ...
    (microsoft.public.access.formscoding)
  • Re: Access 2007 Technical Questions
    ... it would be nice to be able to turn of validation. ... since we do have the before update event also (this is ... forcing the user to STAY on control, or use some quit button on the form! ... then you STILL MUST HAVE form's level validation code!!!. ...
    (microsoft.public.access.formscoding)
  • Re: Access 2007 Technical Questions
    ... When you state put a button on the form, do you mean a command button? ... validation rules as set in the events of that previous control, ... it doesn't matter which of the 2 validation events you put it ... in the validation rules as far as this point is concerned. ...
    (microsoft.public.access.formscoding)
  • Re: Validators in composite control firing prematurely
    ... and seems we can do some certain trick in our composite control's code. ... Then, we override our Custom Control's OnLoad method, there when postback, ... composite control. ... this approach need to disable clientside validation (since the ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Access 2007 Technical Questions
    ... the event model and change to ms-access is not likely. ... it would be nice to be able to turn of validation. ... also have to turn off the before update event. ... forcing the user to STAY on control, or use some quit button on the form! ...
    (microsoft.public.access.formscoding)