Language: TypeScript
Label: safe
CWE: CWE-522 \u2014 Insufficiently Protected Credentials
The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.

Code:
    constructor(token: string, allowCrossOriginAuthentication?: boolean) {
        this.token = token;
        this.allowCrossOriginAuthentication = allowCrossOriginAuthentication;
    }