Enum PowerAuthVersion

java.lang.Object
java.lang.Enum<PowerAuthVersion>
io.getlime.security.powerauth.lib.cmd.consts.PowerAuthVersion
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PowerAuthVersion>, java.lang.constant.Constable

public enum PowerAuthVersion
extends java.lang.Enum<PowerAuthVersion>
PowerAuth protocol version enumeration
Author:
Lukas Lukovsky, lukas.lukovsky@wultra.com
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant Description
    V2_0
    Version 2.0
    V2_1
    Version 2.1
    V3_0
    Version 3.0
    V3_1
    Version 3.1
  • Field Summary

    Fields
    Modifier and Type Field Description
    static com.google.common.collect.ImmutableList<PowerAuthVersion> ALL_VERSIONS
    All supported versions
    static PowerAuthVersion DEFAULT
    Default version
    static com.google.common.collect.ImmutableList<PowerAuthVersion> VERSION_2
    All versions belonging to major version 2
    static com.google.common.collect.ImmutableList<PowerAuthVersion> VERSION_3
    All versions belonging to major version 3
  • Method Summary

    Modifier and Type Method Description
    static PowerAuthVersion fromValue​(java.lang.String value)
    Detects a PowerAuth version from a provided value
    boolean useIv()
    Provides flag whether encryption uses non-zero initialization vector
    java.lang.String value()  
    static PowerAuthVersion valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static PowerAuthVersion[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Field Details

    • ALL_VERSIONS

      public static final com.google.common.collect.ImmutableList<PowerAuthVersion> ALL_VERSIONS
      All supported versions
    • DEFAULT

      public static final PowerAuthVersion DEFAULT
      Default version
    • VERSION_2

      public static final com.google.common.collect.ImmutableList<PowerAuthVersion> VERSION_2
      All versions belonging to major version 2
    • VERSION_3

      public static final com.google.common.collect.ImmutableList<PowerAuthVersion> VERSION_3
      All versions belonging to major version 3
  • Method Details

    • values

      public static PowerAuthVersion[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PowerAuthVersion valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • useIv

      public boolean useIv()
      Provides flag whether encryption uses non-zero initialization vector

      This feature is supported only for protocol V3.1+.

      Returns:
      Flag whether encryption uses non-zero initialization vector
    • value

      public java.lang.String value()
      Returns:
      Version string value
    • fromValue

      public static PowerAuthVersion fromValue​(java.lang.String value)
      Detects a PowerAuth version from a provided value
      Parameters:
      value - Value to detect the version from
      Returns:
      PowerAuth version enum value matching the provided value
      Throws:
      java.lang.IllegalStateException - When the value is not recognized as a PowerAuth version