refreshtokenservice

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type RefreshTokenService

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

RefreshTokenService manages operations on RefreshTokens.

func Provide

Provide provides a new RefreshTokenService configured with the given RefreshTokenRepository.

func (*RefreshTokenService) GetLatestTokenInSession

func (r *RefreshTokenService) GetLatestTokenInSession(token domain.RefreshToken) (*domain.RefreshToken, error)

GetLatestTokenInSession gets the first found RefreshToken in the repository that has the same nonce hash as the provided RefreshToken.

func (*RefreshTokenService) ReplaceRefreshToken

func (r *RefreshTokenService) ReplaceRefreshToken(token domain.RefreshToken) error

ReplaceRefreshToken deletes the existing RefreshToken in the repository that has the same nonce hash as the provided RefreshToken and then stores the provided RefreshToken in the repository.

func (*RefreshTokenService) RevokeLatestRefreshTokenByNonce

func (r *RefreshTokenService) RevokeLatestRefreshTokenByNonce(token domain.RefreshToken) error

RevokeLatestRefreshTokenByNonce revokes the first found RefreshToken in the repository that contains the same nonce as the provided RefreshToken.

func (*RefreshTokenService) SaveNewRefreshToken

func (r *RefreshTokenService) SaveNewRefreshToken(token domain.RefreshToken) (uint, error)

SaveNewRefreshToken saves a new RefreshToken to the repository.

Jump to

Keyboard shortcuts

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