Using MIT gss-api libraries, I've written a C program which gets as an input the full Negotiate token and performs the kerberos authentication (using keytab on the server side). The program successfully calls gss_acquire_cred
and then gss_accept_sec_context
and I'm able to create the context and get back the client token.
Now, how can I get the client principal name / user name? I thought that maybe calling krb5_build_principal
is the right way but I don't see how to get all the input parameters for this function