bshaffer / oauth2-server-php

A library for implementing an OAuth2 Server in php
http://bshaffer.github.io/oauth2-server-php-docs
MIT License
3.26k stars 950 forks source link

Client Credentials grant expiration #852

Open GreenFootballs opened 7 years ago

GreenFootballs commented 7 years ago

By looking at the source I figured out how to set a longer expiration time for the Client Credentials access token. In a trusted client situation, is there any reason not to set the TTL to a very high value, say a year or longer?

And two related questions:

1) if we choose to leave it at the default 3600 seconds, is there a quick way for the client to just check if their token is valid?

2) is it possible to set the token to never expire (e.g. by setting it to zero), or do we have to use a huge number of seconds?