launch

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildLoginResponseRedirectURL added in v0.10.0

func BuildLoginResponseRedirectURL(
	response peregrine.OIDCLoginResponseParams, platformAuthLoginUrl, callbackUrl string,
) (string, error)

BuildLoginResponseRedirectURL generates a form_post url to redirect to the peregrine.Platform AuthLoginURL

func GetCallbackParamsFromRequestFormValues added in v0.10.0

func GetCallbackParamsFromRequestFormValues(r *http.Request) (peregrine.OIDCAuthenticationResponse, error)

GetCallbackParamsFromRequestFormValues parses the *http.Request form values and populates peregrine.OIDCAuthenticationResponse

func GetLoginParamsFromRequestFormValues added in v0.10.0

func GetLoginParamsFromRequestFormValues(r *http.Request) (peregrine.OIDCLoginRequestParams, error)

GetLoginParamsFromRequestFormValues parses the *http.Request form values // and populates peregrine.OIDCLoginRequestParams

Types

type Config

type Config struct {
	// Issuer (REQUIRED) is the issuer used to sign the state JWT
	Issuer string
	// JWTKeySecret (REQUIRED) is the secret used to create the state JWT
	JWTKeySecret string
}

Config holds all the configuration's for Service

type HandleOidcCallbackResponse added in v0.2.0

type HandleOidcCallbackResponse struct {
	Claims peregrine.LTI1p3Claims
	Launch peregrine.Launch
}

type HandleOidcLoginResponse added in v0.2.0

type HandleOidcLoginResponse struct {
	OIDCLoginResponseParams peregrine.OIDCLoginResponseParams
	RedirectURL             string
}

HandleOidcLoginResponse are the return values

type Service

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

Service provides handlers for the LTI launch

func New

func New(config Config, dataSvc peregrine.ToolDataRepo) *Service

New returns a new Service for handling LTI launch

func (*Service) HandleOidcCallback

HandleOidcCallback receives the peregrine.OIDCAuthenticationResponse then validates the state and id_token (with claims) as per http://www.imsglobal.org/spec/security/v1p0/#authentication-response-validation and https://www.imsglobal.org/spec/lti/v1p3#required-message-claims

func (*Service) HandleOidcLogin

HandleOidcLogin receives the peregrine.OIDCLoginRequestParams then validates the request and builds the peregrine.OIDCLoginResponseParams to send the Platform in the redirect to peregrine.Platform AuthLoginURL

Jump to

Keyboard shortcuts

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