DICOM Extended Negotiation of User Identity
Â
DICOM supplement 99 - DICOM User Identity Negotiation.
ftp://medical.nema.org/medical/dicom/final/sup99_ft.pdf
Â
Available in DicomObjects.NET version 5.7.0.39 and all later versions:
Â
Sample c# code:
Â
SCU/Client:
Â
DicomAssociation cn = new DicomAssociation();
cn.Identity = new DicomAssociation.UserIdentity();
Â
cn.Identity.IdentityType = DicomObjects.Enums.UserIdentityType.Kerberos;
cn.Identity.ResponseType = DicomObjects.Enums.UserIdentityResponseType.PositiveResponseRequested;
cn.Identity.PrimaryField = new byte[] { 1, 2, 3, 4 }; // the Kerberos Service Ticket, or the username
          Â
cn.RequestedContexts.Add(...);
cn.Open(...);
byte[] resp = cn.ServerResponse; // will be null is ResponseType is set to NoResponseRequested
Â
SCP/Server:
void server_AssociationRequest(object sender, DicomServer.AssociationRequestArgs e)
{
  DicomAssociation.UserIdentity ident = e.Association.Identity;
    Yon can check the user identity and send a response back if Positive Response is requested
     if (e.Association.Identity.ResponseType == DicomObjects.Enums.UserIdentityResponseType.PositiveResponseRequested)
   {
       if (e.Association.Identity.IdentityType == DicomObjects.Enums.UserIdentityType.Kerberos)
           e.Association.Identity.ServerResponse = new byte[] { 1, 1, 1, 1 }; // the Kerberos Server ticket
       else
           e.Association.Identity.ServerResponse = new byte[0];
   }   Â
}