Marks the decorated class, property, method, or parameter as containing sensitive data.
Marks the decorated class, property, method, or parameter as containing sensitive data.
@Sensitive( sensitive?: boolean)Marks the decorated class, property, method, or parameter as containing sensitive data.
booleanMarks the decorated class, property, method, or parameter as containing sensitive data.
This decorator sets
sensitivetotrueon the correspondingMetadataDescriptor
@Sensitive
class Credentials {
username: string;
password: string;
}
class Employee {
@Sensitive
salary: number;
}
class AuthService {
@Sensitive
authenticate(): Token {
// authentication logic
}
}
class AuthService {
login(
@Sensitive credentials: Credentials
): Token {
// login logic
}
}
class Admin extends User {
@Sensitive(false)
auditLog: string;
}
@Sensitive
class Credentials {
username: string;
password: string;
}
class Employee {
@Sensitive
salary: number;
}
class AuthService {
@Sensitive
authenticate(): Token {
// authentication logic
}
}
class AuthService {
login(
@Sensitive credentials: Credentials
): Token {
// login logic
}
}
class Admin extends User {
@Sensitive(false)
auditLog: string;
}
