Services/Federation and Controllers/ServerToServer become
Federation/{Actors,Signing,Inbox,Outbox,Rendering,Controllers}, the first step
of the roadmap's layout. No type, route or behaviour changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
This commit is contained in:
1 parent
31f6015591
commit
034b792801
14 files changed
+40
-20
No files matched your search
@@ -73,13 +73,16 @@ PrivaPub/ ASP.NET Core Web API, net10.0
|
|||||||
Middleware/SocialPubConfigurations.cs every DI registration (auth, federation, services, swagger, CORS)
|
Middleware/SocialPubConfigurations.cs every DI registration (auth, federation, services, swagger, CORS)
|
||||||
Controllers/ClientToServer/ /clientapi/*: RootUser (signup/login/invitations/recovery), PrivateAvatar,
|
Controllers/ClientToServer/ /clientapi/*: RootUser (signup/login/invitations/recovery), PrivateAvatar,
|
||||||
Group, Post (posts + DMs), Admin, Data
|
Group, Post (posts + DMs), Admin, Data
|
||||||
Controllers/ServerToServer/ PeasantsController (actor, outbox, followers, following, posts, inboxes),
|
Federation/
|
||||||
|
Controllers/ PeasantsController (actor, outbox, followers, following, posts, inboxes),
|
||||||
WellKnownController (webfinger, nodeinfo), UsersController (redirect)
|
WellKnownController (webfinger, nodeinfo), UsersController (redirect)
|
||||||
|
Actors/ LocalActorService (LocalActor, Keys), RemoteActorService (signed fetch,
|
||||||
|
WebFinger, ForeignAvatar cache)
|
||||||
|
Signing/ HttpSignatures (draft-cavage sign/verify)
|
||||||
|
Inbox/ InboxService (Follow/Undo/Create/Delete/Update)
|
||||||
|
Outbox/ DeliveryService + DeliveryWorker
|
||||||
|
Rendering/ ActivityPubRenderer (JsonObject builders)
|
||||||
Services/ RootUsersService, GroupUsersService, PostsService, AppConfigurationService, …
|
Services/ RootUsersService, GroupUsersService, PostsService, AppConfigurationService, …
|
||||||
Services/Federation/ LocalActorService (LocalActor, Keys), HttpSignatures (draft-cavage),
|
|
||||||
RemoteActorService (signed fetch, WebFinger, ForeignAvatar cache),
|
|
||||||
ActivityPubRenderer (JsonObject builders), DeliveryService + DeliveryWorker,
|
|
||||||
InboxService (Follow/Undo/Create/Delete/Update)
|
|
||||||
Models/ Mongo entities: User/, Group/, Post/, Federation/, AppConfiguration
|
Models/ Mongo entities: User/, Group/, Post/, Federation/, AppConfiguration
|
||||||
StaticServices/ DbEntities (Find<T> accessors), AuthTokenManager (JWT), PasswordHasher
|
StaticServices/ DbEntities (Find<T> accessors), AuthTokenManager (JWT), PasswordHasher
|
||||||
Data/InitDb.cs first-run seeding (languages)
|
Data/InitDb.cs first-run seeding (languages)
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ using System.Security.Cryptography;
|
|||||||
|
|
||||||
using GroupEntity = PrivaPub.Models.Group.Group;
|
using GroupEntity = PrivaPub.Models.Group.Group;
|
||||||
|
|
||||||
namespace PrivaPub.Services.Federation
|
namespace PrivaPub.Federation.Actors
|
||||||
{
|
{
|
||||||
public class LocalActor
|
public class LocalActor
|
||||||
{
|
{
|
||||||
+2
-1
@@ -5,8 +5,9 @@ using PrivaPub.StaticServices;
|
|||||||
|
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using PrivaPub.Federation.Signing;
|
||||||
|
|
||||||
namespace PrivaPub.Services.Federation
|
namespace PrivaPub.Federation.Actors
|
||||||
{
|
{
|
||||||
public interface IRemoteActorService
|
public interface IRemoteActorService
|
||||||
{
|
{
|
||||||
+4
-2
@@ -3,14 +3,16 @@ using Microsoft.AspNetCore.Mvc;
|
|||||||
using MongoDB.Entities;
|
using MongoDB.Entities;
|
||||||
|
|
||||||
using PrivaPub.Models.Federation;
|
using PrivaPub.Models.Federation;
|
||||||
using PrivaPub.Services.Federation;
|
|
||||||
using PrivaPub.StaticServices;
|
using PrivaPub.StaticServices;
|
||||||
|
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
|
|
||||||
using PostEntity = PrivaPub.Models.Post.Post;
|
using PostEntity = PrivaPub.Models.Post.Post;
|
||||||
|
using PrivaPub.Federation.Actors;
|
||||||
|
using PrivaPub.Federation.Rendering;
|
||||||
|
using PrivaPub.Federation.Inbox;
|
||||||
|
|
||||||
namespace PrivaPub.Controllers.ServerToServer
|
namespace PrivaPub.Federation.Controllers
|
||||||
{
|
{
|
||||||
[ApiController, Route("peasants")]
|
[ApiController, Route("peasants")]
|
||||||
public class PeasantsController : ControllerBase
|
public class PeasantsController : ControllerBase
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace PrivaPub.Controllers.ServerToServer
|
namespace PrivaPub.Federation.Controllers
|
||||||
{
|
{
|
||||||
[ApiController, Route("users")]
|
[ApiController, Route("users")]
|
||||||
public class UsersController : ControllerBase
|
public class UsersController : ControllerBase
|
||||||
+2
-2
@@ -4,14 +4,14 @@ using MongoDB.Entities;
|
|||||||
|
|
||||||
using PrivaPub.Models.Federation;
|
using PrivaPub.Models.Federation;
|
||||||
using PrivaPub.Models.User;
|
using PrivaPub.Models.User;
|
||||||
using PrivaPub.Services.Federation;
|
|
||||||
using PrivaPub.StaticServices;
|
using PrivaPub.StaticServices;
|
||||||
|
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
|
|
||||||
using PostEntity = PrivaPub.Models.Post.Post;
|
using PostEntity = PrivaPub.Models.Post.Post;
|
||||||
|
using PrivaPub.Federation.Actors;
|
||||||
|
|
||||||
namespace PrivaPub.Controllers.ServerToServer
|
namespace PrivaPub.Federation.Controllers
|
||||||
{
|
{
|
||||||
[ApiController]
|
[ApiController]
|
||||||
public class WellKnownController : ControllerBase
|
public class WellKnownController : ControllerBase
|
||||||
+5
-1
@@ -11,8 +11,12 @@ using System.Text.Json.Nodes;
|
|||||||
using DmPostEntity = PrivaPub.Models.Post.DmPost;
|
using DmPostEntity = PrivaPub.Models.Post.DmPost;
|
||||||
using GroupEntity = PrivaPub.Models.Group.Group;
|
using GroupEntity = PrivaPub.Models.Group.Group;
|
||||||
using PostEntity = PrivaPub.Models.Post.Post;
|
using PostEntity = PrivaPub.Models.Post.Post;
|
||||||
|
using PrivaPub.Federation.Actors;
|
||||||
|
using PrivaPub.Federation.Signing;
|
||||||
|
using PrivaPub.Federation.Rendering;
|
||||||
|
using PrivaPub.Federation.Outbox;
|
||||||
|
|
||||||
namespace PrivaPub.Services.Federation
|
namespace PrivaPub.Federation.Inbox
|
||||||
{
|
{
|
||||||
public sealed record InboxResult(int StatusCode, string Error = default);
|
public sealed record InboxResult(int StatusCode, string Error = default);
|
||||||
|
|
||||||
+3
-1
@@ -7,8 +7,10 @@ using System.Net;
|
|||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
|
using PrivaPub.Federation.Actors;
|
||||||
|
using PrivaPub.Federation.Signing;
|
||||||
|
|
||||||
namespace PrivaPub.Services.Federation
|
namespace PrivaPub.Federation.Outbox
|
||||||
{
|
{
|
||||||
public interface IDeliveryService
|
public interface IDeliveryService
|
||||||
{
|
{
|
||||||
+2
-1
@@ -7,8 +7,9 @@ using System.Text.Json.Nodes;
|
|||||||
|
|
||||||
using PostEntity = PrivaPub.Models.Post.Post;
|
using PostEntity = PrivaPub.Models.Post.Post;
|
||||||
using DmPostEntity = PrivaPub.Models.Post.DmPost;
|
using DmPostEntity = PrivaPub.Models.Post.DmPost;
|
||||||
|
using PrivaPub.Federation.Actors;
|
||||||
|
|
||||||
namespace PrivaPub.Services.Federation
|
namespace PrivaPub.Federation.Rendering
|
||||||
{
|
{
|
||||||
public static class ActivityPubRenderer
|
public static class ActivityPubRenderer
|
||||||
{
|
{
|
||||||
+2
-1
@@ -1,8 +1,9 @@
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using PrivaPub.Federation.Actors;
|
||||||
|
|
||||||
namespace PrivaPub.Services.Federation
|
namespace PrivaPub.Federation.Signing
|
||||||
{
|
{
|
||||||
public sealed record SignatureParameters(string KeyId, string Algorithm, string[] Headers, byte[] Signature,
|
public sealed record SignatureParameters(string KeyId, string Algorithm, string[] Headers, byte[] Signature,
|
||||||
string Created, string Expires);
|
string Created, string Expires);
|
||||||
@@ -11,7 +11,9 @@ using System.Text.Json.Serialization;
|
|||||||
using Microsoft.OpenApi;
|
using Microsoft.OpenApi;
|
||||||
using PrivaPub.Services.ClientToServer.Private;
|
using PrivaPub.Services.ClientToServer.Private;
|
||||||
using PrivaPub.Services.ClientToServer.Public;
|
using PrivaPub.Services.ClientToServer.Public;
|
||||||
using PrivaPub.Services.Federation;
|
using PrivaPub.Federation.Actors;
|
||||||
|
using PrivaPub.Federation.Outbox;
|
||||||
|
using PrivaPub.Federation.Inbox;
|
||||||
|
|
||||||
namespace PrivaPub.Middleware
|
namespace PrivaPub.Middleware
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ using PrivaPub.ClientModels.User;
|
|||||||
using PrivaPub.ClientModels.User.Avatar;
|
using PrivaPub.ClientModels.User.Avatar;
|
||||||
using PrivaPub.Models.User;
|
using PrivaPub.Models.User;
|
||||||
using PrivaPub.Resources;
|
using PrivaPub.Resources;
|
||||||
using PrivaPub.Services.Federation;
|
|
||||||
using PrivaPub.StaticServices;
|
using PrivaPub.StaticServices;
|
||||||
|
using PrivaPub.Federation.Actors;
|
||||||
|
|
||||||
namespace PrivaPub.Services.ClientToServer.Private
|
namespace PrivaPub.Services.ClientToServer.Private
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,10 +7,12 @@ using PrivaPub.ClientModels.Group;
|
|||||||
using PrivaPub.Models.Federation;
|
using PrivaPub.Models.Federation;
|
||||||
using PrivaPub.Models.Group;
|
using PrivaPub.Models.Group;
|
||||||
using PrivaPub.Resources;
|
using PrivaPub.Resources;
|
||||||
using PrivaPub.Services.Federation;
|
|
||||||
using PrivaPub.StaticServices;
|
using PrivaPub.StaticServices;
|
||||||
|
|
||||||
using GroupEntity = PrivaPub.Models.Group.Group;
|
using GroupEntity = PrivaPub.Models.Group.Group;
|
||||||
|
using PrivaPub.Federation.Actors;
|
||||||
|
using PrivaPub.Federation.Rendering;
|
||||||
|
using PrivaPub.Federation.Outbox;
|
||||||
|
|
||||||
namespace PrivaPub.Services
|
namespace PrivaPub.Services
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,13 +7,15 @@ using PrivaPub.ClientModels.Post;
|
|||||||
using PrivaPub.Models.Federation;
|
using PrivaPub.Models.Federation;
|
||||||
using PrivaPub.Models.Group;
|
using PrivaPub.Models.Group;
|
||||||
using PrivaPub.Resources;
|
using PrivaPub.Resources;
|
||||||
using PrivaPub.Services.Federation;
|
|
||||||
using PrivaPub.StaticServices;
|
using PrivaPub.StaticServices;
|
||||||
|
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
|
|
||||||
using DmPostEntity = PrivaPub.Models.Post.DmPost;
|
using DmPostEntity = PrivaPub.Models.Post.DmPost;
|
||||||
using PostEntity = PrivaPub.Models.Post.Post;
|
using PostEntity = PrivaPub.Models.Post.Post;
|
||||||
|
using PrivaPub.Federation.Actors;
|
||||||
|
using PrivaPub.Federation.Rendering;
|
||||||
|
using PrivaPub.Federation.Outbox;
|
||||||
|
|
||||||
namespace PrivaPub.Services
|
namespace PrivaPub.Services
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user