package auth

import "github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/internal/auth"

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

Index

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

token.go

Version
v1.3.0 (latest)
Published
Feb 8, 2025
Platform
linux/amd64
Last checked
4 months ago

Tools for package owners.