Skip to content

Conversation

@MahdiBaghbani
Copy link

@MahdiBaghbani MahdiBaghbani commented Oct 30, 2025

Although this PR is referenced under cs3org/OCM-STA#1, it is not directly part of the STA funded work. However, since the changes are closely related and beneficial to OCM, I decided to port them here as well for consistency.

This PR depends on this PR opencloud-eu/reva#393 to be merged in Reva.
This PR depends on this PR opencloud-eu/opencloud#1714 to be merged in OpenCloud.

Description

This PR implements the frontend components for WAYF (Where Are You From) functionality in the OCM web application, enabling users to discover and select their cloud provider when accepting federated invitations. The implementation provides a user friendly interface for OCM provider selection and complements the backend WAYF discovery endpoints.

Technical

Things I've added to the web application:

  • WAYF Page: Provider selection interface with federation browsing and manual provider entry
  • WAYF is public page: Public access to WAYF page without authentication requirement
  • Invitation Acceptance Modal: Component for invitation acceptance workflow from other EFSS WAYF Pages
  • Token Management: Multiple copy formats (plain, base64, WAYF link) for outgoing invitations
  • Shared Composables: Reusable logic for invitation acceptance and WAYF functionality
  • Federation list display with automatic grouping
  • Manual provider domain entry with OCM discovery

Code Changes

  • New Components:

    • src/views/Wayf.vue: Main WAYF page with provider selection UI, search functionality, and federation display
    • src/views/InvitationAcceptanceModal.vue: Modal component for accepting invitations with provider validation
  • New Composables:

    • src/composables/useWayf.ts: Core WAYF logic including federation loading, provider discovery, and self-domain validation
    • src/composables/useInvitationAcceptance.ts: Shared invitation acceptance logic with self-generated token detection
  • New Types:

    • src/types/wayf.ts: TypeScript interfaces for federation and provider data structures
  • Updated Routing (src/index.ts):

    • Added /wayf route with authContext: 'anonymous' for public access
    • Added /accept-invite route for invitation acceptance workflow
    • Included authentication context documentation
  • Modified Views:

    • src/views/OutgoingInvitations.vue: Added three token copy options (plain, base64, WAYF link) with visual improvements
    • src/views/IncomingInvitations.vue: Refactored to use shared useInvitationAcceptance composable
    • src/views/ConnectionsPanel.vue: Minor UI adjustments
    • src/views/App.vue: Updated to support new routes
  • Documentation:

    • docs/Where Are You From page.md: WAYF usage guide, API endpoints, and testing scenarios

Videos of the changes and general flow of the OCM app

From OpenCloud to oCIS

opencloud-to-ocis.webm

From oCIS to OpenCloud

ocis-to-opencloud.webm

add: Wayf.vue component with provider selection and federation discovery
add: useWayf.ts composable for WAYF logic and provider management
add: InvitationAcceptanceModal.vue for invitation acceptance
add: useInvitationAcceptance.ts composable to share acceptance logic
add: wayf.ts types for federation and provider interfaces
add: WAYF documentation
add: /wayf route with anonymous authentication support
add: /accept-invite route for invitation acceptance workflow
add: Configure anonymous authContext for public WAYF access
refactor: IncomingInvitations to use shared acceptance composable
add: multiple token copy options to OutgoingInvitations (plain, base64, WAYF link)
enhance: token display with separate copy buttons for each format
enhance: Filter out current instance from federation provider lists

Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
@kulmann
Copy link
Contributor

kulmann commented Dec 18, 2025

Since the backend PRs are merged by now we'll start reviewing the web part (this PR) next

@kulmann kulmann mentioned this pull request Dec 18, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants