io.vertx.ext.auth

## Class JWTOptions

- java.lang.Object
- - io.vertx.ext.auth.JWTOptions

- Direct Known Subclasses:
    JWTOptions

      public class JWTOptions
      extends Object

  Options related to creation of new tokens. If any expiresInMinutes, audience, subject, issuer are not provided, there is no default. The jwt generated won't include those properties in the payload. Generated JWTs will include an iat claim by default unless noTimestamp is specified.
  Author:
    Paulo Lopes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JWTOptions()`
    `JWTOptions(JsonObject json)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JWTOptions` | `addAudience(String audience)`
    `JWTOptions` | `addPermission(String permission)` Add a permission to this token.
    `String` | `getAlgorithm()`
    `List<String>` | `getAudience()`
    `int` | `getExpiresInSeconds()`
    `JsonObject` | `getHeader()`
    `String` | `getIssuer()`
    `int` | `getLeeway()`
    `List<String>` | `getPermissions()`
    `String` | `getSubject()`
    `boolean` | `isIgnoreExpiration()`
    `boolean` | `isNoTimestamp()`
    `JWTOptions` | `setAlgorithm(String algorithm)`
    `JWTOptions` | `setAudience(List<String> audience)`
    `JWTOptions` | `setExpiresInMinutes(int expiresInMinutes)`
    `JWTOptions` | `setExpiresInSeconds(int expiresInSeconds)`
    `JWTOptions` | `setHeader(JsonObject header)`
    `JWTOptions` | `setIgnoreExpiration(boolean ignoreExpiration)`
    `JWTOptions` | `setIssuer(String issuer)`
    `JWTOptions` | `setLeeway(int leeway)`
    `JWTOptions` | `setNoTimestamp(boolean noTimestamp)`
    `JWTOptions` | `setPermissions(List<String> permissions)` The permissions of this token.
    `JWTOptions` | `setSubject(String subject)`
    `JsonObject` | `toJSON()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JWTOptions

          public JWTOptions()

    - #### JWTOptions

          public JWTOptions(JsonObject json)

  - ### Method Detail

    - #### toJSON

          public JsonObject toJSON()

    - #### getLeeway

          public int getLeeway()

    - #### setLeeway

          public JWTOptions setLeeway(int leeway)

    - #### isIgnoreExpiration

          public boolean isIgnoreExpiration()

    - #### setIgnoreExpiration

          public JWTOptions setIgnoreExpiration(boolean ignoreExpiration)

    - #### getAlgorithm

          public String getAlgorithm()

    - #### setAlgorithm

          public JWTOptions setAlgorithm(String algorithm)

    - #### getHeader

          public JsonObject getHeader()

    - #### setHeader

          public JWTOptions setHeader(JsonObject header)

    - #### isNoTimestamp

          public boolean isNoTimestamp()

    - #### setNoTimestamp

          public JWTOptions setNoTimestamp(boolean noTimestamp)

    - #### getExpiresInSeconds

          public int getExpiresInSeconds()

    - #### setExpiresInSeconds

          public JWTOptions setExpiresInSeconds(int expiresInSeconds)

    - #### setExpiresInMinutes

          public JWTOptions setExpiresInMinutes(int expiresInMinutes)

    - #### getAudience

          public List<String> getAudience()

    - #### setAudience

          public JWTOptions setAudience(List<String> audience)

    - #### addAudience

          public JWTOptions addAudience(String audience)

    - #### getIssuer

          public String getIssuer()

    - #### setIssuer

          public JWTOptions setIssuer(String issuer)

    - #### getSubject

          public String getSubject()

    - #### setSubject

          public JWTOptions setSubject(String subject)

    - #### setPermissions

          public JWTOptions setPermissions(List<String> permissions)

      The permissions of this token.
      Parameters:
        `permissions` - the permissions for this token that will be used for AuthZ
      Returns:
        fluent API

    - #### addPermission

          public JWTOptions addPermission(String permission)

      Add a permission to this token.
      Parameters:
        `permission` - permission for this token that will be used for AuthZ
      Returns:
        fluent API

    - #### getPermissions

          public List<String> getPermissions()

Copyright © 2020 Eclipse. All rights reserved.