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.
Click to show internal directories.
Click to hide internal directories.