Cookies on this site

We would like to use cookies to understand how the site is used and to measure our campaigns. Nothing is set until you choose, and you can change your mind at any time from “Cookie settings” at the foot of every page. Privacy policy

Contact UsContact Us

Resources / Blogs

Cloud & apps

Access API method without user authentication in Liferay 6.2

To access some API method before the user is authenticated in Liferay 6.2, we have to explicitly allow guest access. Learn more about Liferay 6.2 authentication.

· · 1 min read

Access API

While building a full-fledged web project is greatly leveraged by Liferay, it might so happen that we require to access some API method before the user is authenticated, where a common example could be a custom login hook. In the normal scenario, such method access would generate a security exception. In such cases we have to explicitly expose the method for guest access, which can be achieved simply by adding an annotation above the method definition in the implementing class for that method, like so:

public class MyClassServiceImpl extends MyClassServiceBaseImpl {

@AccessControlled(guestAccessEnabled=true) /*To make this method

accessible without logging in*/

public int methodOne() throws PortalException, SystemException

{

//Do something

return resultOne;

}

public int methodTwo() throws PortalException, SystemException /*Method not accessible

unauthenticated*/

{

//Do something else

return resultTwo;

}

}

Princeton IT is the leading software development company in USA. Get in touch!

← All articles

Case studies

Cloud Consulting in practice

Client names are withheld. We are happy to share details on a call.

All case studies
  • Delivered

    On-prem → Amazon RDS

    Nonprofit

    Cloud Consulting

    Oracle from on-premises to Amazon RDS for a national nonprofit

    The nonprofit's on-premises Oracle database had become hard to maintain and scale. We planned the move with automated workflows and validation tests, migrated to Amazon RDS for Oracle with minimal disruption and left a repeatable process for future changes.

    • Automated, tested migration
    • Less day-to-day database upkeep
  • Delivered

    600k files, < 3 days

    Document management

    Microsoft

    600,000 documents moved from ImageRight to SharePoint in under three days

    A one-file-at-a-time script would have needed about 22 days of continuous running. We rebuilt the migration around a SQL work queue with parallel uploads, automatic retries and crash recovery, and it finished unattended in under three days.

    • 1,125 → 8,314 files per hour
    • Under 3 days instead of about 22
  • Delivered

    Every change, flagged

    Food manufacturing

    AI Consulting

    Label comparison agent for a national food cooperative

    Compares two versions of a product label, highlights every change, annotates the PDF and returns an audit-ready list of differences. We moved it from Copilot Studio to Azure Functions when the document processing outgrew the low-code platform.

    • Audit-ready differences in one chat turn
    • Rebuilt from low-code to cloud functions

Keep reading

All Cloud & apps articles

Moving an application to the cloud?

Request a migration plan consult. We will scope the move with you and come back with a fixed-scope plan.