---
lang: en
title: 'API docs: security.defaultsubject.addcredential'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/security
permalink: /doc/en/lb4/apidocs.security.defaultsubject.addcredential.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/security](./security.md) &gt; [DefaultSubject](./security.defaultsubject.md) &gt; [addCredential](./security.defaultsubject.addcredential.md)

## DefaultSubject.addCredential() method

**Signature:**

```typescript
addCredential(...credentials: Credential[]): void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

credentials


</td><td markdown="1">

[Credential](./security.credential.md)<!-- -->\[\]


</td><td markdown="1">


</td></tr>
</tbody></table>

**Returns:**

void


