oauth

package
v0.0.0-...-270f78c Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Zlib Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct{}

Service represents a service used to authenticate users against an authorization server

func NewService

func NewService() *Service

NewService returns a pointer to a new instance of this service

func (*Service) Authenticate

func (*Service) Authenticate(code string, configuration *portainer.OAuthSettings) (portainer.OAuthUserData, error)

Authenticate takes an access code and exchanges it for an access token from portainer OAuthSettings token environment(endpoint). On success, it will then return the username and token expiry time associated to authenticated user by fetching this information from the resource server and matching it with the user identifier setting.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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