OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions Build a custom API?

This topic contains 2 replies, has 1 voice, and was last updated by  oro6 6 years, 10 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #36455

    oro6
    Participant

    Hello friends,

    I created a custom bundle which holds users (different from ORO user). I want to build a JWT based API (besides the ORO API) for this so it can be used as a login entry in a third party site. Has anybody done this before? Is this possible?

    I use Lexik JWT bundle for this, but on a login request to my security controller I only get a exception like “$domainObject must either implement the DomainObjectInterface, object that have a method named “getId” or single identifier entity.”

    Thanks for hints!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #36456

    oro6
    Participant

    so if anyone is interested, here is an update:

    you can actually use your own security config if you load the bundle which contains it with a higher priority than the oro security bundle. with this I’ve managed to build a JWT based REST API in parallel to the existing oro api which uses different routes of course.

    as for the “DomainObjectInterface” error: this seems to be a known bug and we managed to “fix” this by extending the oro security bundle and patch ObjectIdAccessor.php – but as we don’t know if that fix is the correct way to go (in fact this is just a try catch around the Exception throwing) we did not submit this yet.

    cheers

    #36457

    oro6
    Participant

    marked as resolved.

Viewing 2 replies - 1 through 2 (of 2 total)

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top