auth

package
v3.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 0 Imported by: 16

Documentation

Overview

Package auth provides an abstraction over claims-based security for Azure Event Hub and Service Bus.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	// TokenType is the type of CBS token
	TokenType TokenType
	Token     string
	Expiry    string
}

Token contains all of the information to negotiate authentication

func NewToken

func NewToken(tokenType TokenType, token, expiry string) *Token

NewToken constructs a new auth token

type TokenProvider

type TokenProvider interface {
	GetToken(uri string) (*Token, error)
}

TokenProvider abstracts the fetching of authentication tokens

type TokenType

type TokenType string

TokenType represents types of tokens known for claims-based auth

const (
	// CBSTokenTypeJWT is the type of token to be used for JWTs. For example Azure Active Directory tokens.
	CBSTokenTypeJWT TokenType = "jwt"
	// CBSTokenTypeSAS is the type of token to be used for SAS tokens.
	CBSTokenTypeSAS TokenType = "servicebus.windows.net:sastoken"
)

Jump to

Keyboard shortcuts

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