#A腕AA8#A~AA`f[fSAA@fxZf A˶APAPANfP&ApA%AfA`f(AAqfh[f`*AYfX)AHA[ff"AYf#A腕A0Of8#AAOfWfSAA@VfVf AOfP&AA`rfUf`*A@ҝAhAؒfTfPf"APUf#A腕ASf(Tff@fSfSf@TfSf@ f@fTfpTf@f@f@fTf0Uf@0fTfUfHUfTf@Xf@f@f@fUfVfA@ЌfUfUf VfUf8Vf(Wf@f@ f@HfVfVf@yf@pfVfVfWfVfPVfxUfhSfXTfTf`Uf@WfWfXWf@`f@fWfWfWfXf(Yf\f@f@f@fhXfXf Xf@ fPXfXfXf8Xf@f@ fYfXf@f@`f@f@8fYfYf@@1V`fpYfYfYfXYfZfZf[fp\f@f@1Vf@1V؎fxZfZf@f`ZfZfZfHZf@(f@Pf@xf8[f[f@f [fP[f[f[f@ȏf@f@(f[f@\f@Pf[f\fX\f[fZfZf[fp\f\f@YfWfXf(Yf\f\f@f@xfp]fX]f]fx^f^f`f@@f@f@Ȑf^fH^f@f]f^f`^f]f@ f@f^f^f@`f@@f@f@f _fh_f@@f_f8_f_f^f_f`f@ f@%s_%s', $prefix, Token_Manager::TOKEN_SUFFIX ); // The option_name column in wp_options is a varchar(191) $max_length = 191; if ( strlen( $key ) > $max_length ) { throw new InvalidArgumentException( sprintf( __( 'The token auth prefix must be at most %d characters, including a trailing hyphen.', '%TEXTDOMAIN%' ), 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; } }