Oauth2CleanupCommand
extends BaseCommand
in package
OAuth2 Cleanup Command
Table of Contents
Methods
- buildOptionParser() : ConsoleOptionParser
- Hook method for defining this command's option parser.
- execute() : int|null
- Implement this method with your command's logic.
- cleanUnusedClients() : int
- 一度も認可に使われていない古いクライアントを削除する
Methods
buildOptionParser()
Hook method for defining this command's option parser.
public
buildOptionParser(ConsoleOptionParser $parser) : ConsoleOptionParser
Parameters
- $parser : ConsoleOptionParser
-
The parser to be defined
Return values
ConsoleOptionParser —The built parser.
execute()
Implement this method with your command's logic.
public
execute(Arguments $args, ConsoleIo $io) : int|null
Parameters
- $args : Arguments
-
The command arguments.
- $io : ConsoleIo
-
The console io
Return values
int|null —The exit code or null for success
cleanUnusedClients()
一度も認可に使われていない古いクライアントを削除する
private
cleanUnusedClients() : int
動的クライアント登録は無認証で開いているため、使われないクライアントが 溜まり続ける。アクセストークンの発行実績が無く、登録から一定期間が 経過したものを削除する。
Return values
int —削除した件数