auth

package
Version: v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: MIT Imports: 0 Imported by: 0

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"
)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL