io.vertx.ext.auth

## Class PubSecKeyOptions

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

-     public class PubSecKeyOptions
      extends Object

  Options describing Key stored in PEM format.
  Author:
    Paulo Lopes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PubSecKeyOptions()` Default constructor
    `PubSecKeyOptions(JsonObject json)` Constructor to create an options from JSON
    `PubSecKeyOptions(PubSecKeyOptions other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAlgorithm()`
    `Buffer` | `getBuffer()` The PEM or Secret key buffer.
    `String` | `getId()`
    `String` | `getPublicKey()` Deprecated.
    `String` | `getSecretKey()` Deprecated.
    `boolean` | `isCertificate()` Deprecated.
    `boolean` | `isSymmetric()` Deprecated.
    `PubSecKeyOptions` | `setAlgorithm(String algorithm)`
    `PubSecKeyOptions` | `setBuffer(Buffer buffer)` The PEM or Secret key buffer.
    `PubSecKeyOptions` | `setBuffer(String buffer)` The PEM or Secret key buffer.
    `PubSecKeyOptions` | `setCertificate(boolean certificate)` Deprecated.
    `PubSecKeyOptions` | `setId(String id)`
    `PubSecKeyOptions` | `setPublicKey(String publicKey)` Deprecated. This setter ignored the PEM prefix and suffix which would assume the key to be RSA. Use `setBuffer(String)` with the full content of your OpenSSL pem file. A PEM file must contain at least 3 lines:
           -----BEGIN PUBLIC KEY----
           ...
           -----END PUBLIC KEY---
    `PubSecKeyOptions` | `setSecretKey(String secretKey)` Deprecated. This setter ignored the PEM prefix and suffix which would assume the key to be RSA. Use `setBuffer(String)` with the full content of your OpenSSL pem file. A PEM file must contain at least 3 lines:
           -----BEGIN PRIVATE KEY----
           ...
           -----END PRIVATE KEY---
    `PubSecKeyOptions` | `setSymmetric(boolean symmetric)` Deprecated.
    `JsonObject` | `toJson()`

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

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

- - ### Constructor Detail

    - #### PubSecKeyOptions

          public PubSecKeyOptions()

      Default constructor

    - #### PubSecKeyOptions

          public PubSecKeyOptions(PubSecKeyOptions other)

      Copy constructor
      Parameters:
        `other` - the options to copy

    - #### PubSecKeyOptions

          public PubSecKeyOptions(JsonObject json)

      Constructor to create an options from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

    - #### getAlgorithm

          public String getAlgorithm()

    - #### setAlgorithm

          public PubSecKeyOptions setAlgorithm(String algorithm)

    - #### getBuffer

          public Buffer getBuffer()

      The PEM or Secret key buffer. When working with secret materials, the material is expected to be encoded in `UTF-8`. PEM files are expected to be `US_ASCII` as the format uses a base64 encoding for the payload.
      Returns:
        the buffer.

    - #### setBuffer

          public PubSecKeyOptions setBuffer(String buffer)

      The PEM or Secret key buffer. When working with secret materials, the material is expected to be encoded in `UTF-8`. PEM files are expected to be `US_ASCII` as the format uses a base64 encoding for the payload.
      Returns:
        self.

    - #### setBuffer

          public PubSecKeyOptions setBuffer(Buffer buffer)

      The PEM or Secret key buffer. When working with secret materials, the material is expected to be encoded in `UTF-8`. PEM files are expected to be `US_ASCII` as the format uses a base64 encoding for the payload.
      Returns:
        self.

    - #### getId

          public String getId()

    - #### setId

          public PubSecKeyOptions setId(String id)

    - #### getPublicKey

          @Deprecated
          public String getPublicKey()

      Deprecated.

    - #### setPublicKey

          @Deprecated
          public PubSecKeyOptions setPublicKey(String publicKey)

      Deprecated. This setter ignored the PEM prefix and suffix which would assume the key to be RSA. Use `setBuffer(String)` with the full content of your OpenSSL pem file. A PEM file must contain at least 3 lines:

             -----BEGIN PUBLIC KEY----
             ...
             -----END PUBLIC KEY---

      Parameters:
        `publicKey` - the naked public key
      Returns:
        self

    - #### getSecretKey

          @Deprecated
          public String getSecretKey()

      Deprecated.

    - #### setSecretKey

          @Deprecated
          public PubSecKeyOptions setSecretKey(String secretKey)

      Deprecated. This setter ignored the PEM prefix and suffix which would assume the key to be RSA. Use `setBuffer(String)` with the full content of your OpenSSL pem file. A PEM file must contain at least 3 lines:

             -----BEGIN PRIVATE KEY----
             ...
             -----END PRIVATE KEY---

      Parameters:
        `secretKey` - the naked public key
      Returns:
        self

    - #### isSymmetric

          @Deprecated
          public boolean isSymmetric()

      Deprecated.

    - #### setSymmetric

          @Deprecated
          public PubSecKeyOptions setSymmetric(boolean symmetric)

      Deprecated.

    - #### isCertificate

          @Deprecated
          public boolean isCertificate()

      Deprecated.

    - #### setCertificate

          @Deprecated
          public PubSecKeyOptions setCertificate(boolean certificate)

      Deprecated.

Copyright © 2024 Eclipse. All rights reserved.