Class IDPasswordCredentials
  
  Represents simple ID/password textual credentials.
Note: The password is stored as plain text
 
  
  
    Inheritance
    System.Object
    
    IDPasswordCredentials
   
  
  
    Inherited Members
    
    
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
   
  
  Assembly: NFX.dll
  Syntax
  
    [Serializable]
public class IDPasswordCredentials : Credentials, IStringRepresentableCredentials
   
  Constructors
  
  
  
  
  IDPasswordCredentials(IConfigSectionNode)
  Warning: storing plain credentials in config file is not secure. Use this method for the most simplistic cases
like unit testing
 
  
  Declaration
  
    public IDPasswordCredentials(IConfigSectionNode cfg)
   
  Parameters
  
  
  
  
  IDPasswordCredentials(String, String)
  
  
  Declaration
  
    public IDPasswordCredentials(string id, string pwd)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        id | 
         | 
      
      
        | System.String | 
        pwd | 
         | 
      
    
  
  Properties
  
  
  
  
  ID
  
  
  Declaration
  
    public string ID { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  
  Password
  
  
  Declaration
  
    public string Password { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  
  SecurePassword
  Obtains an unsecure string password as SecureBuffer.
Note: The IDPasswordCredentials class is purposely designed to store password as plain text.
This is needed for simple cases and HTTP application where login credentials are posted via plain text anyway
 
  
  Declaration
  
    public SecureBuffer SecurePassword { get; }
   
  Property Value
  
  Methods
  
  
  
  
  Forget()
  Deletes sensitive password information.
This method is mostly used on client (vs. server) to prevent process memory-inspection attack.
Its is usually called right after Login() was called.
Implementers may consider forcing post-factum GC.Collect() on all generations to make sure that orphaned
memory buff with sensitive information, that remains in RAM even after all references are killed, gets
compacted. This class implementation DOES NOT call Gc.Collect();
 
  
  Declaration
  
    public override void Forget()
   
  Overrides
  
  
  
  
  FromBasicAuth(String)
  Creates IDPass credentials from base64 encoded auth header content as provided by RepresentAsString() method.
Returns null if the content is unparsable
 
  
  Declaration
  
    public static IDPasswordCredentials FromBasicAuth(string basicAuth)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        basicAuth | 
         | 
      
    
  
  Returns
  
  
  
  
  PlainPasswordToSecureBuffer(String)
  Obtains an unsecure string password as SecureBuffer.
Note: The IDPasswordCredentials class is purposely designed to store password as plain text.
This is needed for simple cases and HTTP application where login credentials are posted via plain text anyway
 
  
  Declaration
  
    public static SecureBuffer PlainPasswordToSecureBuffer(string password)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        password | 
         | 
      
    
  
  Returns
  
  
  
  
  RepresentAsString()
  
  
  Declaration
  
    public string RepresentAsString()
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  
  ToString()
  
  
  Declaration
  
    public override string ToString()
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  Overrides
  System.Object.ToString()
  Implements
  
  Extension Methods