oauthinfoservice

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ProviderProductionSet provides an OAuthInfoService for use in production.
	ProviderProductionSet = wire.NewSet(Provide, wire.Bind(new(domain.OAuthInfoService), new(*OAuthInfoService)))
)

Functions

This section is empty.

Types

type OAuthInfoService

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

OAuthInfoService processes information about OAuthInfos.

func Provide

Provide returns an OAuthInfoService configured with the provided MeetingPlatformService and OAuthInfoRepository.

func (*OAuthInfoService) CreateOAuthInfo

func (o *OAuthInfoService) CreateOAuthInfo(ctx context.Context, authorization string, userID uint, platform *domain.MeetingPlatform) error

CreateOAuthInfo creates an OAuthInfo in the repository by exchanging the given authorization with the MeetingPlatform.

func (*OAuthInfoService) GetAllAuthenticatedPlatforms

func (o *OAuthInfoService) GetAllAuthenticatedPlatforms(userID uint) ([]*domain.MeetingPlatform, error)

GetAllAuthenticatedPlatforms gets all MeetingPlatforms a User with the provided userID has authenticated with.

func (*OAuthInfoService) GetOAuthInfo

func (o *OAuthInfoService) GetOAuthInfo(userID uint, platform *domain.MeetingPlatform) (*domain.OAuthInfo, error)

GetOAuthInfo retrieves the OAuthInfo from the repository for the given User and MeetingPlatform combination. If the access tokens contained withing the OAuthInfo is expired, it is automatically refreshed.

Jump to

Keyboard shortcuts

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