microsoft

package
v0.0.0-...-1c246ab Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MicrosoftAdapter

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

MicrosoftAdapter is an adapter for Microsoft OAuth2.

func NewMicrosoftAdapter

func NewMicrosoftAdapter(tenantID, clientID, clientSecret, redirectURL string) *MicrosoftAdapter

NewMicrosoftAdapter creates a new MicrosoftAdapter with the given client configuration.

func (*MicrosoftAdapter) ExchangeCodeForToken

func (m *MicrosoftAdapter) ExchangeCodeForToken(code string) (*model.TokenResponse, error)

ExchangeCodeForToken exchanges an authorization code for tokens.

func (*MicrosoftAdapter) GetAuthURL

func (m *MicrosoftAdapter) GetAuthURL(state string) string

GetAuthURL generates the Microsoft OAuth2 authorization URL.

func (*MicrosoftAdapter) GetRedirectURL

func (m *MicrosoftAdapter) GetRedirectURL() string

GetRedirectURL returns the redirect URL configured for the Microsoft OAuth2 provider.

func (*MicrosoftAdapter) GetRefreshToken

func (m *MicrosoftAdapter) GetRefreshToken(refreshToken string) (*model.TokenResponse, error)

Get Refresh Token

Jump to

Keyboard shortcuts

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