Class IssueTokenTask


  • public class IssueTokenTask
    extends KeyStoreTask
    A task that will issue a signed JWT token for the current configuration.
    Author:
    Alex Kalderimis
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PRIVATEKEY_ALIAS
      The alias of the private key
      static java.lang.String PRIVATEKEY_PASSWORD
      The password of the private key.
      static java.lang.String PUBLICIDENTITY
      The identity of the issuing entity (i.e.
      • Fields inherited from class org.apache.tools.ant.Task

        description, location, target, taskName, taskType, wrapper
      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        project
    • Constructor Summary

      Constructors 
      Constructor Description
      IssueTokenTask()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()  
      protected java.util.Properties getOptions()
      Get the options as configured for this task
      void setBuildDir​(java.lang.String buildDir)
      Bean-style setter, as per the ant spec.
      void setEmail​(java.lang.String email)
      Bean-style setter, as per the ant spec.
      void setExpiry​(java.lang.String expiry)
      Bean-style setter, as per the ant spec.
      void setSubject​(java.lang.String identity)
      Bean-style setter, as per the ant spec.
      • Methods inherited from class org.apache.tools.ant.Task

        getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
      • Methods inherited from class org.apache.tools.ant.ProjectComponent

        getProject, setProject
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PUBLICIDENTITY

        public static final java.lang.String PUBLICIDENTITY
        The identity of the issuing entity (i.e. us)
        See Also:
        Constant Field Values
      • PRIVATEKEY_PASSWORD

        public static final java.lang.String PRIVATEKEY_PASSWORD
        The password of the private key.
        See Also:
        Constant Field Values
      • PRIVATEKEY_ALIAS

        public static final java.lang.String PRIVATEKEY_ALIAS
        The alias of the private key
        See Also:
        Constant Field Values
    • Constructor Detail

      • IssueTokenTask

        public IssueTokenTask()
    • Method Detail

      • setExpiry

        public void setExpiry​(java.lang.String expiry)
        Bean-style setter, as per the ant spec.
        Parameters:
        expiry - The number of seconds the token will be valid for.
      • setBuildDir

        public void setBuildDir​(java.lang.String buildDir)
        Bean-style setter, as per the ant spec.
        Parameters:
        buildDir - The directory to save the token in.
      • setSubject

        public void setSubject​(java.lang.String identity)
        Bean-style setter, as per the ant spec.
        Parameters:
        identity - The subject to issue a claim for.
      • setEmail

        public void setEmail​(java.lang.String email)
        Bean-style setter, as per the ant spec.
        Parameters:
        email - The email address passed as a parameter
      • execute

        public void execute()
        Overrides:
        execute in class org.apache.tools.ant.Task
      • getOptions

        protected java.util.Properties getOptions()
        Description copied from class: KeyStoreTask
        Get the options as configured for this task
        Overrides:
        getOptions in class KeyStoreTask
        Returns:
        The project properties.