# Class: JWTAuthHandler

## vertx-web-js/jwt_auth_handler~ JWTAuthHandler

#### new JWTAuthHandler()

An auth handler that provides JWT Authentication support.

Source:
  - vertx-web-js/jwt_auth_handler.js, line 32

### Methods

#### addAuthorities(authorities) → {AuthHandler}

Add a set of required authorities for this auth handler

##### Parameters:

Name | Type | Description
--- | --- | ---
`authorities` | Array.<string> | the set of authorities

Source:
  - vertx-web-js/jwt_auth_handler.js, line 72

##### Returns:

a reference to this, so the API can be used fluently

Type
  AuthHandler

#### addAuthority(authority) → {AuthHandler}

Add a required authority for this auth handler

##### Parameters:

Name | Type | Description
--- | --- | ---
`authority` | string | the authority

Source:
  - vertx-web-js/jwt_auth_handler.js, line 57

##### Returns:

a reference to this, so the API can be used fluently

Type
  AuthHandler

#### handle(arg0)

##### Parameters:

Name | Type | Description
--- | --- | ---
`arg0` | RoutingContext |

Source:
  - vertx-web-js/jwt_auth_handler.js, line 43

#### setAudience(audience) → {JWTAuthHandler}

Set the audience list

##### Parameters:

Name | Type | Description
--- | --- | ---
`audience` | Array.<string> | the audience list

Source:
  - vertx-web-js/jwt_auth_handler.js, line 87

##### Returns:

a reference to this for fluency

Type
  JWTAuthHandler

#### setIgnoreExpiration(ignoreExpiration) → {JWTAuthHandler}

Set whether expiration is ignored

##### Parameters:

Name | Type | Description
--- | --- | ---
`ignoreExpiration` | boolean | whether expiration is ignored

Source:
  - vertx-web-js/jwt_auth_handler.js, line 117

##### Returns:

a reference to this for fluency

Type
  JWTAuthHandler

#### setIssuer(issuer) → {JWTAuthHandler}

Set the issuer

##### Parameters:

Name | Type | Description
--- | --- | ---
`issuer` | string | the issuer

Source:
  - vertx-web-js/jwt_auth_handler.js, line 102

##### Returns:

a reference to this for fluency

Type
  JWTAuthHandler