- rbac/: Role type, constants, HasPermission, RoleFromString - blocks/: BlockFunc, BlockMeta, BlockContext, context accessors, BlockRegistry interface - templates/: TemplateFunc, meta types, TemplateRegistry interface - auth/: Claims, PublicClaims, context extractors - content/: Content interface, AuthorProfile/PageInfo/PostInfo types - settings/: Settings interface, map accessor helpers - gating/: AccessRule, AccessResult, EvaluateAccess, Gating interface - crypto/: Crypto interface (Encrypt/Decrypt) - render/: BlockNoteToHTML standalone renderer - video/: ParseEmbedURL, EmbedIframeURL - ai/: ToolDefinition, ToolResult, ToolRegistry interface Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
383 B
Go
19 lines
383 B
Go
package auth
|
|
|
|
import "github.com/google/uuid"
|
|
|
|
// Claims represents admin user JWT claims.
|
|
// Plugins receive these from context — they don't parse JWTs themselves.
|
|
type Claims struct {
|
|
UserID uuid.UUID
|
|
Email string
|
|
Role string
|
|
}
|
|
|
|
// PublicClaims represents public/community user JWT claims.
|
|
type PublicClaims struct {
|
|
UserID uuid.UUID
|
|
Email string
|
|
Username string
|
|
}
|