cas_connector

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

README

CAS Connector for Apache Answer

This is a connector type plugin handling login through CAS.

Installation

You can follow the official documentation to install this plugin.

answer build --with github.com/nizil/answer-plugin-cas

Configuration

In the Admin panel of Answer, within the Plugins menu, enable CAS Connector.

Then, from the CAS Connector configuration page, you must fill the Server URL entry with the URL of your CAS server. Optionaly, you can provide a Display Name to personalize the login button (default to CAS Connector).

Finaly, you may want to disable new registration and password login from the Advanced/Login panel, hence forcing your users to use the CAS login.

Usage

Simply login using the new Connect with <Display Name> button.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Info embed.FS

Functions

This section is empty.

Types

type CasConnector

type CasConnector struct {
	Config *CasConnectorConfig
}

func (*CasConnector) ConfigFields

func (c *CasConnector) ConfigFields() []plugin.ConfigField

ConfigFields describes the settings form shown under Admin -> Plugins -> CAS Connector.

func (*CasConnector) ConfigReceiver

func (c *CasConnector) ConfigReceiver(config []byte) error

ConfigReceiver is called by Answer whenever the settings form above is saved, with the submitted values marshalled back into ConnectorConfig's JSON shape.

func (*CasConnector) ConnectorLogoSVG

func (c *CasConnector) ConnectorLogoSVG() string

ConnectorLogoSVG returns the logo in SVG format

func (*CasConnector) ConnectorName

func (c *CasConnector) ConnectorName() plugin.Translator

ConnectorName returns the name of the connector

func (*CasConnector) ConnectorReceiver

func (c *CasConnector) ConnectorReceiver(ctx *plugin.GinContext, receiverURL string) (userInfo plugin.ExternalLoginUserInfo, err error)

ConnectorReceiver handles the callback endpoint of the connector

func (*CasConnector) ConnectorSender

func (c *CasConnector) ConnectorSender(ctx *plugin.GinContext, receiverURL string) (redirectURL string)

ConnectorSender handles the start endpoint of the connector

func (*CasConnector) ConnectorSlugName

func (c *CasConnector) ConnectorSlugName() string

ConnectorSlugName returns the slug name of the connector

func (*CasConnector) Info

func (c *CasConnector) Info() plugin.Info

type CasConnectorConfig

type CasConnectorConfig struct {
	ServerURL   string `json:"server_url"`
	DisplayName string `json:"display_name"`
}

ConnectorConfig is persisted by Answer (as JSON) whenever an admin saves the plugin's settings page, and reloaded into Connector.Config on startup.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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