Interface nsIAuthModuleType

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Called to get the next token in a sequence of authentication steps.

    Parameters

    • aInToken: voidPtr

      A buffer containing the input token (e.g., a challenge from a server). This may be null.

    • aInTokenLength: number

      The length of the input token.

    • aOutToken: voidPtr

      If getNextToken succeeds, then aOutToken will point to a buffer to be sent in response to the server challenge. The length of this buffer is given by aOutTokenLength. The buffer at aOutToken must be recycled with a call to free.

    • aOutTokenLength: number

      If getNextToken succeeds, then aOutTokenLength contains the length of the buffer (number of bytes) pointed to by aOutToken.

    Returns void

  • Other flags may be defined in the future

    Called to initialize an auth module. The other methods cannot be called unless this method succeeds.

    Parameters

    • aServiceName: string

      the service name, which may be null if not applicable (e.g., for NTLM, this parameter should be null).

    • aServiceFlags: number

      a bitwise-or of the REQ_ flags defined above (pass REQ_DEFAULT for default behavior).

    • aDomain: string

      the authentication domain, which may be null if not applicable.

    • aUsername: string

      the user's login name

    • aPassword: string

      the user's password

    Returns void

  • Unwrap() is used to unpack, decrypt, and verify the checksums on data returned by a server when security layers are in use.

    Parameters

    • aInToken: voidPtr

      A buffer containing the data received from the server

    • aInTokenLength: number

      The length of the input token

    • aOutToken: voidPtr

      A buffer containing the plaintext data from the server

    • aOutTokenLength: number

      The length of the output token buffer

      Unwrap() may return NS_ERROR_NOT_IMPLEMENTED, if the underlying authentication mechanism does not support security layers.

    Returns void

  • Once a security context has been established through calls to GetNextToken() it may be used to protect data exchanged between client and server. Calls to Wrap() are used to protect items of data to be sent to the server.

    Parameters

    • aInToken: voidPtr

      A buffer containing the data to be sent to the server

    • aInTokenLength: number

      The length of the input token

    • confidential: boolean

      If set to true, Wrap() will encrypt the data, otherwise data will just be integrity protected (checksummed)

    • aOutToken: voidPtr

      A buffer containing the resulting data to be sent to the server

    • aOutTokenLength: number

      The length of the output token buffer

      Wrap() may return NS_ERROR_NOT_IMPLEMENTED, if the underlying authentication mechanism does not support security layers.

    Returns void

Generated using TypeDoc