‚°ÍKF¨8 $max_length ) { throw new InvalidArgumentException( sprintf( __( 'The token auth prefix must be at most %d characters, including a trailing hyphen.', 'tribe-common' ), absint( $max_length - strlen( Token_Manager::TOKEN_SUFFIX ) ) ) ); } self::get_container()->singleton( self::TOKEN_OPTION_NAME, $key ); } /** * Set the token authorization expiration. * * @param int $seconds The time seconds the cache will exist for. * -1 = disabled, 0 = no expiration. * * @return void */ public static function set_auth_cache_expiration( int $seconds ): void { static::$auth_cache_expiration = $seconds; } /** * Get the token authorization expiration. * * @return int */ public static function get_auth_cache_expiration(): int { return static::$auth_cache_expiration; } /** * Set the underlying storage driver. * * @param class-string $class_name The FQCN to a storage driver. * * @return void */ public static function set_storage_driver( string $class_name ): void { static::$storage_driver = $class_name; } /** * Get the underlying storage driver. * * @return class-string */ public static function get_storage_driver(): string { $driver = static::$storage_driver; return $driver ?: Option_Storage::class; } }