gcpsign

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package gcpsign contains a client of GCP Cloud KMS RSA256 asymmetric signning.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client of GCP CloudKMS asymmetric signning service. We use CloudKMS to sign JWT and epxose RSA public keys in KMS for verify.

func New

func New(ctx context.Context, projectID, keyRingLocation, keyRingName, keyName string, client *kms.KeyManagementClient) (*Client, error)

New returns Client.

func (*Client) PublicKeys

func (s *Client) PublicKeys() *jose.JSONWebKeySet

PublicKeys in KMS.

func (*Client) SignJWT

func (s *Client) SignJWT(ctx context.Context, claims interface{}, header map[string]string) (string, error)

SignJWT signs the given claims return the jwt string.

Directories

Path Synopsis
Binary gcpsign contains a signning test run on real CloudKMS.
Binary gcpsign contains a signning test run on real CloudKMS.

Jump to

Keyboard shortcuts

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