jwt

package
v0.0.0-...-d3ccc4f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddArangoSyncJwtHeader

func AddArangoSyncJwtHeader(req *http.Request, jwtSecret string) error

AddArangoSyncJwtHeader calculates a JWT authorization header, for authorization of a request to an arangosync server, based on the given secret and adds it to the given request. If the secret is empty, nothing is done.

func AddArangodJwtHeader

func AddArangodJwtHeader(req *http.Request, jwtSecret string) error

AddArangodJwtHeader calculates a JWT authorization header, for authorization of a request to an arangod server, based on the given secret and adds it to the given request. If the secret is empty, nothing is done.

func CreateArangodJwtAuthorizationHeader

func CreateArangodJwtAuthorizationHeader(jwtSecret string) (string, error)

CreateArangodJwtAuthorizationHeader calculates a JWT authorization header, for authorization of a request to an arangod server, based on the given secret. If the secret is empty, nothing is done.

func VerifyArangoSyncJwtHeader

func VerifyArangoSyncJwtHeader(req *http.Request, jwtSecret string) error

VerifyArangoSyncJwtHeader verifies the bearer token in the given request with the given secret. If returns nil when verification succeed, an error if verification fails. If the secret is empty, nothing is done.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL