erfcommon

package module
v0.0.0-...-c9307ba Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: MIT Imports: 2 Imported by: 2

README

erfcommon

Build Status Coverage Status

Common code required by the erfserver and erfclient projects.

There should be no need to individually download and install this project. See the erftesting project for more information.

Documentation

Overview

Copyright 2018 Thales UK Limited

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int64Ptr

func Int64Ptr(v int64) *int64

Int64Ptr is a convenience method for constructing pointers from literals

func StringPtr

func StringPtr(v string) *string

StringPtr is a convenience method for constructing pointers from literals

Types

type ErfClaims

type ErfClaims struct {
	Subject    *string `json:"sub"`
	IssuedAt   *int64  `json:"iat"`
	ExpiresAt  *int64  `json:"exp"`
	Previous   *string `json:"pre"`
	SequenceNo *int64  `json:"seq"`
}

ErfClaims defines the JWT claims used in ERF.

func ParseToken

func ParseToken(t []byte) (*jwt.Token, *ErfClaims, error)

ParseToken converts token bytes into an object and set of claims. It does not validate the token.

func (*ErfClaims) Valid

func (e *ErfClaims) Valid() error

Valid checks all fields are non-nil

Jump to

Keyboard shortcuts

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