credentials

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package credentials 包含不会将凭据内容写入错误或日志的本地输入校验。

Index

Constants

This section is empty.

Variables

View Source
var ErrCookieRefreshTokenInput = errors.New("cookie input is not supported; provide a Pixiv App API refresh token")

ErrCookieRefreshTokenInput 表示调用方误把网页 Cookie 当成 App API refresh token。 此错误不包含输入内容,避免凭据进入 CLI、MCP 或日志输出。

Functions

func ValidateRefreshTokenInput

func ValidateRefreshTokenInput(input string) (string, error)

ValidateRefreshTokenInput 只接受 Pixiv App API 的不透明 refresh token。单个 "x=y" 仍可能是合法 token;但 Cookie 的明确名称或多 cookie pair 一律拒绝,绝不 从中提取或转换 refresh_token。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL