/redaxo-ycom:ycom-external-authfrom redaxo-ycom
Configures SAML, OAuth2, and CAS SSO for YCom. Covers config files, login buttons, allowed-domain restrictions, default user data, and field-mapping extension points.
Ships in redaxo-ycom. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
YCom integrates with three SSO protocols out of the box: SAML, OAuth2, CAS. Each has its own config file, its own value field, and a matching extension point for mapping the external identity to a rex_ycom_user.
All three protocols load their config via rex_addon::get('ycom')->getDataPath('<protocol>.php'), i.e. from redaxo/data/addons/ycom/. The path is identical regardless of REDAXO instance — keep these files out of git and version-control only an .example.php template.
Config file: redaxo/data/addons/ycom/saml.php — return an array of SAML settings consumed by the OneLogin/php-saml library YCom bundles.
Login button on a YForm form:
ycom_auth_saml|SAML Login|Fehler bei SAML-Login|example.com|{"status":1}|1
Parameters:
label – button labelerror_msg – shown when SAML returns an errorallowed_domains – comma-separated email domains allowed to register via SAML (empty = all)default_userdata_json – JSON with default field values for newly-created users (e.g. {"status":1})direct_link (0/1) – if 1, redirect to the IdP immediately on page load instead of showing a click-to-login buttonConfig file: redaxo/data/addons/ycom/oauth2.php — return a settings array consumed by league/oauth2-client's GenericProvider.
<?php
$settings = [
'clientId' => 'myapp',
'clientSecret' => 'secret',
'redirectUri' => '', // empty = use current URL
'urlAuthorize' => 'https://provider.com/authorize',
'urlAccessToken' => 'https://provider.com/token',
'urlResourceOwnerDetails' => 'https://provider.com/userinfo',
];
return $settings;
Login button:
ycom_auth_oauth2|OAuth2 Login|Fehler bei OAuth2-Login|example.com|{"status":1}|1
Same parameter shape as SAML.
Config file: redaxo/data/addons/ycom/cas.php — settings for the CAS server. The CAS server CA cert lives next to it at redaxo/data/addons/ycom/cas_cert.pem.
ycom_auth_cas|CAS Login|Fehler bei CAS-Login|example.com|{"status":1}
CAS does not support direct_link (no parameter) — always click-to-login.
When an external login completes, YCom creates or updates a rex_ycom_user. The mapping is customizable via per-protocol extension points:
rex_extension::register('YCOM_AUTH_SAML_MATCHING', function (rex_extension_point $ep) {
$params = $ep->getParams();
$userdata = $ep->getSubject();
// Map external attributes onto YCom user fields
$userdata['firstname'] = $params['saml_attributes']['givenName'][0] ?? '';
$userdata['name'] = $params['saml_attributes']['surname'][0] ?? '';
$userdata['email'] = $params['saml_attributes']['mail'][0] ?? '';
return $userdata;
});
OAuth2 and CAS use the same pattern with YCOM_AUTH_OAUTH2_MATCHING / YCOM_AUTH_CAS_MATCHING.
There's also a generic YCOM_AUTH_MATCHING that fires for all external auth methods — use it for shared logic (e.g. "set group based on email domain") and the per-protocol EPs for protocol-specific attribute mapping.
The allowed_domains parameter on the value field is a comma-separated list of email domains. Logins from emails outside the list are rejected even if the IdP succeeds — useful for B2B portals where only employees of partner companies should be allowed.
ycom_auth_saml|SAML Login|Fehler|partner1.com,partner2.com|{"status":1}|0
Empty domain list = allow all.
default_userdata_json sets values on new users created via the external auth. Common patterns:
{"status": 1}
Auto-confirm new SSO users (skip the registration confirmation flow — the IdP already verified them).
{"status": 1, "ycom_groups": "5"}
Auto-confirm AND assign group 5 (e.g. "SSO users").
direct_link=1 skips the click-to-login button and redirects to the IdP immediately when the form loads. Useful for SSO-only sites where there's no email/password fallback.
When using direct_link, make sure the form is on a dedicated login article — placing it on a generic page would auto-redirect every visitor.
default_userdata_json for SAML/OAuth2 users — new users default to status=0 (pending) and can't actually log in until manually confirmed.redirectUri in OAuth2 settings must match what's registered with the provider — including trailing slash differences.email field but not login – YCom uses login for the unique identifier when login_field=login. Either set both or change login_field to email.YCOM_AUTH_MATCHING. If both modify the same field, the protocol-specific one wins.default_userdata_json accordingly.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub friendsofredaxo/claude-marketplace --plugin redaxo-ycom8 skills in this plugin
/ycom-extension-pointsYCom extension points (YCOM_CONFIG, YCOM_AUTH_INIT, YCOM_AUTH_LOGIN, YCOM_USER_CREATE, etc.), the injection system for intercepting the auth flow (OTP, password change, terms-of-use, custom injections), session management (rex_ycom_user_session), and user activity logging (rex_ycom_log). Use when the user customizes the auth flow, intercepts login/logout, adds custom auth steps (e.g. mandatory profile completion), manages sessions, or sets up activity logging./ycom-formsReady-to-use YCom form recipes – login, logout, registration with email confirmation, profile edit, password change (with and without old-password check), password reset, terms-of-use re-acceptance. Pipe and PHP syntax. Includes the YCom-specific value/validate/action fields (ycom_auth_password, ycom_auth_load_user, ycom_auth_logout, ycom_auth_returnto, ycom_auth_db, ycom_user_token, etc.). Use when the user builds any frontend form that interacts with YCom./ycom-otpYCom OTP / two-factor authentication setup – TOTP and email-based OTP, the otp_article_id setup article, ycom_auth_otp setup field, OTP email template, enforcement modes, and the injection that gates unverified sessions. Use when the user enables 2FA, configures OTP enforcement levels, builds the OTP setup form, or troubleshoots the OTP flow./ycom-overviewYCom architecture for REDAXO – core classes, user model (rex_ycom_user), authentication API (rex_ycom_auth), status constants, config keys (article_id_login, session_duration, otp_*), brute-force rules, and the standard navigation/login-state integration. Use when the user works with YCom for the first time, looks up an auth API method, configures session timeouts or login redirects, builds a meta navigation that switches based on login state, or programmatically creates/logs in users./ycom-permissionsArticle and media permissions in YCom – the group plugin (group-based article/media access, group permission types) and the media_auth plugin (media-pool file protection, .htaccess rewrite rule, redirect rules). Use when the user gates articles by login state or group, sets up media file protection, configures redirects for unauthorized access, or queries group membership programmatically./ycom-quickstartOne-shot recipe to bootstrap a complete YCom community frontend on a REDAXO instance that has the FriendsOfREDAXO `api` addon installed. Builds a clean tree under a Community category — six entry-point sections (login, password-forgot, profile, password-change, registration, logout) as sub-categories so they appear in the meta navigation automatically, and three token-target sub-articles (registration-confirm, password-reset, terms-of-use) tucked under their related section. Wires the YForm pipe code into slices on the standard "YForm Formbuilder" module, sets per-article ycom_auth_type, inserts the email templates, and writes the ycom/auth config keys. Use when the user asks to "set up YCom community pages", "scaffold the YCom frontend", "create the login/registration flow", or runs a fresh REDAXO instance that needs YCom wired up programmatically. Skip when the instance has no `api` addon (offer the manual setup from `ycom-forms` instead).Other plugins' skills for the same job