Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GenHMACKeyCmd = &cobra.Command{ Use: "genhmac", Short: "Generates a key suitable for HMAC-SHA-256", Long: `genhmac generates a random key 512 bytes long, the block size of SHA256, then base64 encodes it. This is sutable for use as the jwt key for serve and gentoken.`, Run: GenHMACKey, }
View Source
var GenRSACmd = &cobra.Command{ Use: "genrsa", Short: "Generates a key suitable for RSA", Long: `genrsa generates a random key 2048 bits long, the block size of SHA256, then base64 encodes it. This is sutable for use as the jwt key for serve and gentoken.`, Run: GenRSA, }
View Source
var GenTokenCmd = &cobra.Command{ Use: "gentoken <payload>", Short: "Generates a token, signed by a key.", Long: `Generates a token signed by either an HMAC or RSA key. Use genhmac or genrsa to generate these keys. Payload must be a valid JSON object `, Run: GenToken, }
View Source
var VerifyCmd = &cobra.Command{ Use: "verify", Short: "A brief description of your command", Long: `A longer description that spans multiple lines and likely contains examples and usage of using your command. For example: Cobra is a CLI library for Go that empowers applications. This application is a tool to generate the needed files to quickly create a Cobra application.`, Run: Verify, }
Functions ¶
func GenHMACKey ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.