Could you point a good way to implement a bearer token by using PHP?

Hi Experts

Could you point a good way to implement a bearer token by using PHP?

Thanks in advance
Eduardo FuerteDeveloper and AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
What are you going to be using it for?
Are you going to be connecting to an existing Authentication service?
Are you going to setup your own?

What authentication scheme are you wanting to use (OAuth, JWT, Other)?
Eduardo FuerteDeveloper and AnalystAuthor Commented:

I'm planning to use
Slim Framework
and they say at the end of this page:

In conclusion
Slim framework offers a clean and quick way to build a REST api. Although it does not have built-in libraries for authentication you can easily add 3rd party code for the same. The extremely small size of the base framework allows a quick installation on any server. In future posts we will look into some authentication methods for Slim framework.
Julian HansenCommented:
A bearer token is just a hash that identifies a person to a service. Usually you use it to get an access token.

A bearer token usually has a long life span
An access token has a much shorter life span (30min for example)

The paragraph above seems to indicate that you need to implement your own authentication. That leaves it wide open and subject to your requirements.

You could use OAuth or JWT's or you could use a very simple login. Depending on wh

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

Eduardo FuerteDeveloper and AnalystAuthor Commented:
I'm going to better study your references.

Thank you for help!
Julian HansenCommented:
You are welcome - I see my post got truncated - there was a bit that came after that that seems to have been lost - sorry about that.
Eduardo FuerteDeveloper and AnalystAuthor Commented:
No problems!
It was very understandable.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.