DOIP Client Library - JavaScript Version
    Preparing search index...

    Class TokenAuthenticationInfo

    Used for token-based authentication.

    // Acquire an access token using the method called for by your DOIP service
    const authentication = new TokenAuthenticationInfo('ACCESS_TOKEN');
    const serviceInfo = {
    ipAddress: 'localhost',
    port: 9000
    };
    const client = new StandardDoipClient({ authentication, serviceInfo });

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructs a TokenAuthenticationInfo.

      Parameters

      • token: string

        Authentication token. This should be acquired from the DOIP service using whatever method is provided by that service.

      • OptionalclientId: string

        Optional clientId to send in requests using this token

      • OptionalasUserId: string

        If present, instructs the DOIP service to perform operations as this user

      Returns TokenAuthenticationInfo

    Properties

    clientId?: string

    Optional Client ID or username for this token.

    token: string

    Authentication token. This should be acquired from the DOIP service using whatever method is provided by that service.

    asUserId?: string

    If present, operations will be preformed as this user.

    Methods

    • Returns the clientId property to be used in DOIP requests made with this AuthenticationInfo.

      Returns undefined | string

    • Returns the authentication token.

      Returns string

    • Returns (async) the authentication property to be used in DOIP requests made with this AuthenticationInfo.

      Returns Promise<Json>