compile insert O4WOPENID

common /openid_endpoints/ provider_info%

* Config record values
Equ OPENID_CFG_ID$ To "CFG_OPENID"
/* Configurable parameters - read from config file
1.	Flag to indicate OpenID should be available (0=no openid, 1=openid 2.0, 2=openid connect)
2.	Name of generic OpenID user
3.	Login UI Layout (O4W only/O4W then OpenID/OpenID then O4W/OpenID only)
4.	Flag to indicate OpenID should ‘match’ O4W users] Flag To indicate OpenID can create new users
5.	(Optional) Name of match routine
6.	(Optional) Name of DEBUG record to create
10.	OpenID Connect Allow text to allow dynamic selection of provider (leave blank if not allowed)
11.	OpenID Connect Flag to allow for dynamic registration (1/0 Yes/No)
12.	OpenID Connect Application Name (for dynamic registration)
13.	OpenID Connect CSS for UI
15.	OpenID Connect Provider Name]
16.	OpenID Connect Provider Image URL]
17.	OpenID Connect Provider style]
18.	OpenID Connect Provider Discovery URL]
19.	OpenID Connect Provider Authorization Endpoint URL]
20.	OpenID Connect Provider Token Endpoint URL]
21.	OpenID Connect Provider Registration Endpoint URL]
22.	OpenID Connect Provider Registered Client ID]
23.	OpenID Connect Provider Registered Client Secret]
24.	OpenID Connect Provider Registered Redirect URL]
25.   (Optional) Token name used during OpenID2.0 To OpenID Connect migration request (openid2_realm Or openid.realm)]
26.   (Optional) Token name used during OpenID2.0 To OpenID Connect migration response (openid2_id Or openid_id)]
*/
Equ OPENID_CFG_ACTIVE$ To 1
Equ OPENID_CFG_GENERIC$ To 2
Equ OPENID_CFG_LAYOUT$ To 3
Equ OPENID_CFG_OPTIONS$ To 4
Equ OPENID_CFG_MATCH_ROUTINE$ To 5
Equ OPENID_CFG_DEBUG$ To 6
* openid connect (o4wopenid v2) support:
EQU OPENID_CFG_DYNAMIC_SELECTION_PROMPT$		TO 10
EQU OPENID_CFG_DYNAMIC_REGISTRATION_FLAG$		TO 11
EQU OPENID_CFG_DYNAMIC_REGISTRATION_APPNAME$		TO 12
EQU OPENID_CFG_CONNECT_CSS$				TO 13
EQU OPENID_CFG_PROVIDER_NAME$				TO 15
EQU OPENID_CFG_PROVIDER_IMG$				TO 16
EQU OPENID_CFG_PROVIDER_STYLE$				TO 17
EQU OPENID_CFG_PROVIDER_DISCOVERY_URL$			TO 18
EQU OPENID_CFG_PROVIDER_AUTHORIZATION_URL$		TO 19
EQU OPENID_CFG_PROVIDER_TOKEN_URL$			TO 20
EQU OPENID_CFG_PROVIDER_REGISTRATION_URL$		TO 21
EQU OPENID_CFG_PROVIDER_CLIENTID$			TO 22
EQU OPENID_CFG_PROVIDER_SECRET$				TO 23
EQU OPENID_CFG_PROVIDER_REDIRECT$			TO 24
Equ OPENID_CFG_MIGRATE$ To 25
Equ OPENID_CFG_MIGRATE_RESPONSE$ To 26

* what calls does the helper routine support?
Equ OPENID_ISACTIVE$ To "1"
Equ OPENID_LOGIN$ To "2"
Equ OPENID_VALIDATE$ To "3"
Equ OPENID_MATCH$ To "4"
Equ OPENID_OPTIONS$ To "5"

EQU OPENID_ACTIVE_NO$		TO "0"
EQU OPENID_ACTIVE_V1$		TO "1"
EQU OPENID_ACTIVE_CONNECT$	TO "2"
Equ O4W_2FA$                  To "2FA"

* how should we support OpenID?
Equ LOGIN_TYPE_O4W_ONLY$ To 0
Equ LOGIN_TYPE_O4W_OPENID$ To 1
Equ LOGIN_TYPE_OPENID_O4W$ To 2
Equ LOGIN_TYPE_OPENID_ONLY$ To -1
Equ LOGIN_TYPE_2FA$ To 3

* what are the options?
Equ OPTION_TYPE_MATCH$ To 1
Equ OPTION_TYPE_ADDNEW$ To 2


* Specify some defaults
Equ OPENID_CFG_MATCHROUTINE_DEFAULT$ To "RTI_OPENID_SUPPORT"
Equ OPENID_CFG_LAYOUT_DEFAULT$ To LOGIN_TYPE_O4W_OPENID$

Equ OPENID_CONNECT_DISCOVERY_FRAGMENT$ TO ".well-known/openid-configuration"
equ openid_connect_issuer_discovery_fragment$ to ".well-known/webfinger"
equ openid_connect_issuer_discovery_rel$ to "http://openid.net/specs/connect/1.0/issuer"
