piranha.core | Piranha CMS is the friendly editor | Content Management System library
kandi X-RAY | piranha.core Summary
kandi X-RAY | piranha.core Summary
This is a complete rewrite of Piranha CMS. The goal of this rewrite is to create a version capable of targeting multiple platforms & frameworks with minimal dependencies, but still provide a flexible & high performance CMS library.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of piranha.core
piranha.core Key Features
piranha.core Examples and Code Snippets
Community Discussions
Trending Discussions on piranha.core
QUESTION
Very new to Piranha and Vue, but not to .Net Core. Trying to get my arms around how to create custom blocks. I've created a new block, attempting to marry the HtmlBlock and ImageBlock:
...ANSWER
Answered 2020-Nov-30 at 18:28Just in case this helps someone. Turns out I did a poor job merging the two blocks together. Chalk this one up to inexperience with both Piranha and Vue.js. I was mixing the code from the docs with the code in the repo. Don't do that - the docs are understandably still a bit behind. I'm not throwing stones at the developers, I really dig what they've created and will continue to put forth the effort to use it proficiently.
Below is what I came up with for the Vue component. There are probably still a few tweaks to be made to separate the Image-Block and Html-Block code better, but it now works, saves, and does not throw errors in the console.
QUESTION
I'm tasked to provide the excellent Piranha CMS through an API that other UI projects will consume. Piranha docs say it's designed to run "headless" for this purpose, but not many details on how.
I've got the Piranha.WebApi project running, and it serves JSON content of pages as I expect. Currently, it works only when I access it from a browser, because any call to the WebApi prompts for credentials. Once I sign in, the WebApi calls succeed and I can make multiple calls from the same browser.
Now I need to know how other UI code projects can authenticate when calling the WebApi so they can get results.
I've reviewed the links I could find; no good hints yet:
- https://piranhacms.org/blog/techniques-for-securing-pages
- https://github.com/PiranhaCMS/piranha.core/issues/841
- https://github.com/PiranhaCMS/piranha.core/issues/546
Any suggestions will be very helpful!
...ANSWER
Answered 2020-Apr-08 at 06:46The package Piranha.WebApi
uses claims to verify the caller, but how these claims actually get assigned to the user is up to you. The default security implementation Piranha.AspNetCore.Identity
by default configures cookie-based security, but if you're only using your application in a headless manner another security setup could probably be beneficial.
More information on how to configure the Identity module can be found here:
https://piranhacms.org/docs/architecture/authentication/identity
Another option is to just provide your own Api instead of using the Piranha.WebApi
package. If you take a look at the code for the Api-package here you can see that there's absolutely no logic in these endpoints, they just call the registered Piranha.IApi
object.
https://github.com/PiranhaCMS/piranha.core/blob/master/core/Piranha.WebApi/PageApiController.cs#L45
Best regards
Håkan
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install piranha.core
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page