亚欧-克利-插头-欧斯
Adobe I/O CLI 的 Auth 插件支持对 Adobe 身份管理服务(IMS)的管理令牌,例如登录,登录,以及检索和使用令牌等.
依赖关系
| 模块 | 版本 | 下载 | 构建状态 | 覆盖范围 | 问题 | 调取请求 |
|---|---|---|---|---|---|---|
| @adobe/aio-lib-ims (英语) | ||||||
| @adobe/aio-lib-ims-jwt | ||||||
| @adobe/aio-lib-ims-oauth (英语) |
动机
这个插件为认证提供了Adobe IMS支持.
此插件支持 :
- 证书的多重配置
- 支持多个认证类型(JWT, OAuth2( 三脚通过浏览器))
- 对认证插件的支持(即服务符号支持)
Java脚本套件
Adobe IMS 支持插件的收藏 :
- 这个 Adobe I/O Lib 核心IMS支助图书馆 是可重复使用的基础库,为 Adobe IMS API 提供 JavaScript 级别 API ,以及获取对令牌的访问。 这个图书馆的所有功能都可以通过简单地要求这个图书馆而获得.
- 这个 Adobe I/O CLI Auth 插件 是 Adobe IO CLI 的主要认证插件.
- 2个延期 Adobe I/O IMS 支持图书馆 支持为不同的使用案例创建IMS标志. 他们都是作为节点包来的. 它们被 Adobe I/O IMS 支持图书馆 以实施访问符创建。 插件为:
- 这个 Adobe I/O Lib 核心IMS图书馆 JWT 支持 支持生成和交换 JWT Tokens 的访问符号.
- 这个 Adobe I/O Lib 核心 IMS 库 OAuth2 支持 支持使用基于普通浏览器的SUSI流创建符. Adobe I/O CLI将推出一个网站,将用户重定向到IMS登录,成功登录后,访问令牌会返回CLI.
如何运作
这个 Adobe IO CLI Auth 插件 提供三个命令:
login创建并返回 Adobe IMS 访问符。 由于代号被缓存在Adobe IO CLI配置中,只有在目前被缓存的代号已经过期(或即将在10分钟内到期)的情况下才会创建出一个实际代号.logout取消缓存的快取符并把它们从缓存中删除。 除了访问令牌,这也可用于使任何可能被缓存的刷新令牌无效.ctx用于管理配置环境.
使用量
$ aio plugins:install -g @adobe/aio-cli-plugin-auth
$ # OR
$ aio discover -i
$ aio auth --help
图标
aio auth
Adobe IMS 命令登录和登录.
USAGE
$ aio auth
DESCRIPTION
Adobe IMS commands to login and logout.
The main commands are `auth login` to get or create an access token and
`auth logout` to invalidate an access token and thus log out from Adobe IMS.
Logging in and out is based on configuration of which there may be
multiple. Each set of configuration properties, called an Adobe IMS context,
can be individually addressed by a label.
Configuration for the Adobe IMS commands is stored in the "ims"
configuration property. The special property "ims.config.current" contains the
label of the current configuration which can be set using the
"aio auth ctx -s <label>" command.
Each set of properties in a labeled Adobe IMS context configurations has
configuration properties depending on the kind of access that is
supported. The below example shows the configuration for OAuth2
based (graphical SUSI) login.
The "env" property is optional and designates the Adobe IMS environment
used for authentication. Possible values are "stage" and "prod".
If the property is missing or any other value, it defaults to "prod".
All commands allow their normal output to be formatted in either
HJSON (default), JSON, or YAML.
EXAMPLES
{
ims: {
contexts: {
postman: {
env: "stage",
callback_url: "https://callback.example.com",
client_id: "example.com-client-id",
client_secret: "XXXXXXXX",
scope: "openid AdobeID additional_info.projectedProductContext read_organizations",
state: ""
}
},
config: {
current: "postman"
}
}
}
参见代码 : src/commands/auth/index.js (中文(简体) )
aio auth ctx
管理 Adobe IMS 上下文 .
USAGE
$ aio auth ctx [--debug <value>] [-v] [-l | -g] [-c <value>] [--list | --value | -s <value> | ]
FLAGS
-c, --ctx=<value> Name of the Adobe IMS context to use. Default is the current Adobe IMS context
-g, --global global config
-l, --local local config
-s, --set=<value> Sets the name of the current local Adobe IMS context
-v, --verbose Verbose output
--debug=<value> Debug level output
--list Names of the Adobe IMS contexts as an array
--value Prints named or current Adobe IMS context data
DESCRIPTION
Manage Adobe IMS contexts.
The following options exist for this command:
* List the names of the configured Adobe IMS contexts
* Print the name of the current Adobe IMS context
* Set the name of the current Adobe IMS context
* Print the configuration of the current or a named Adobe IMS context
Currently it is not possible to update the Adobe Adobe IMS context configuration
using this command. Use the "aio config" commands for this.
e.g. aio config:set ims.contexts.your_context.your_context_key "your_context_value"
Please note, that the following IMS context label names is reserved: `cli`
and should not be used as an IMS context name.
Also note that the current context can only be set locally.
ALIASES
$ aio ctx
$ aio context
参见代码 : src/commands/auth/ctx.js (英语)
aio auth login
登录特定 Adobe IMS 上下文并返回访问符 .
USAGE
$ aio auth login [--debug <value>] [-v] [-l | -g] [-c <value>] [-f] [-d] [-b] [-o]
FLAGS
-b, --bare print access token only
-c, --ctx=<value> Name of the Adobe IMS context to use. Default is the current Adobe IMS context
-d, --decode Decode and display access token data
-f, --force Force logging in. This causes a forced logout on the context first and makes sure to not use any
cached data when calling the plugin.
-g, --global global config
-l, --local local config
-o, --[no-]open Open the default browser to complete the login
-v, --verbose Verbose output
--debug=<value> Debug level output
DESCRIPTION
Log in with a certain Adobe IMS context and returns the access token.
If the Adobe IMS context already has a valid access token set (valid meaning
at least 10 minutes before expiry), that token is returned.
Otherwise, if the Adobe IMS context has a valid refresh token set (valid
meaning at least 10 minutes before expiry) that refresh token is
exchanged for an access token before returning the access token.
Lastly, if the Adobe IMS context properties are supported by one of the
Adobe IMS login plugins, that login plugin is called to guide through
the IMS login process.
The currently supported Adobe IMS login plugins are:
* aio-lib-ims-jwt for JWT token based login supporting
Adobe I/O Console service integrations.
* aio-lib-ims-oauth for browser based OAuth2 login. This
plugin will launch the default browser to guide the user through the
login process. The plugin itself will *never* see the user's
password but only receive the authorization token after the
user has authenticated with Adobe IMS.
ALIASES
$ aio login
参见代码 : src/commands/auth/login.js (中文(简体) )
aio auth logout
记录当前或命名为 Adobe 的 IMS 上下文 .
USAGE
$ aio auth logout [--debug <value>] [-v] [-l | -g] [-c <value>] [-f]
FLAGS
-c, --ctx=<value> Name of the Adobe IMS context to use. Default is the current Adobe IMS context
-f, --[no-]force Invalidate the refresh token as well as all access tokens.
Otherwise only the access token is invalidated. For Adobe IMS
contexts not supporting refresh tokens, this flag has no
effect.
-g, --global global config
-l, --local local config
-v, --verbose Verbose output
--debug=<value> Debug level output
DESCRIPTION
Log out the current or a named Adobe IMS context.
This command can be called multiple times on the same Adobe IMS context with
out causing any errors. The assumption is that after calling this command
without an error, the Adobe IMS context's access and refresh tokens have been
invalidated and removed from persistent storage. Repeatedly calling this
command will just do nothing.
ALIASES
$ aio logout
参见代码 : src/commands/auth/logout.js (简体中文)
aio context
管理 Adobe IMS 上下文 .
USAGE
$ aio context [--debug <value>] [-v] [-l | -g] [-c <value>] [--list | --value | -s <value> | ]
FLAGS
-c, --ctx=<value> Name of the Adobe IMS context to use. Default is the current Adobe IMS context
-g, --global global config
-l, --local local config
-s, --set=<value> Sets the name of the current local Adobe IMS context
-v, --verbose Verbose output
--debug=<value> Debug level output
--list Names of the Adobe IMS contexts as an array
--value Prints named or current Adobe IMS context data
DESCRIPTION
Manage Adobe IMS contexts.
The following options exist for this command:
* List the names of the configured Adobe IMS contexts
* Print the name of the current Adobe IMS context
* Set the name of the current Adobe IMS context
* Print the configuration of the current or a named Adobe IMS context
Currently it is not possible to update the Adobe Adobe IMS context configuration
using this command. Use the "aio config" commands for this.
e.g. aio config:set ims.contexts.your_context.your_context_key "your_context_value"
Please note, that the following IMS context label names is reserved: `cli`
and should not be used as an IMS context name.
Also note that the current context can only be set locally.
ALIASES
$ aio ctx
$ aio context
aio ctx
管理 Adobe IMS 上下文 .
USAGE
$ aio ctx [--debug <value>] [-v] [-l | -g] [-c <value>] [--list | --value | -s <value> | ]
FLAGS
-c, --ctx=<value> Name of the Adobe IMS context to use. Default is the current Adobe IMS context
-g, --global global config
-l, --local local config
-s, --set=<value> Sets the name of the current local Adobe IMS context
-v, --verbose Verbose output
--debug=<value> Debug level output
--list Names of the Adobe IMS contexts as an array
--value Prints named or current Adobe IMS context data
DESCRIPTION
Manage Adobe IMS contexts.
The following options exist for this command:
* List the names of the configured Adobe IMS contexts
* Print the name of the current Adobe IMS context
* Set the name of the current Adobe IMS context
* Print the configuration of the current or a named Adobe IMS context
Currently it is not possible to update the Adobe Adobe IMS context configuration
using this command. Use the "aio config" commands for this.
e.g. aio config:set ims.contexts.your_context.your_context_key "your_context_value"
Please note, that the following IMS context label names is reserved: `cli`
and should not be used as an IMS context name.
Also note that the current context can only be set locally.
ALIASES
$ aio ctx
$ aio context
aio login
登录特定 Adobe IMS 上下文并返回访问符 .
USAGE
$ aio login [--debug <value>] [-v] [-l | -g] [-c <value>] [-f] [-d] [-b] [-o]
FLAGS
-b, --bare print access token only
-c, --ctx=<value> Name of the Adobe IMS context to use. Default is the current Adobe IMS context
-d, --decode Decode and display access token data
-f, --force Force logging in. This causes a forced logout on the context first and makes sure to not use any
cached data when calling the plugin.
-g, --global global config
-l, --local local config
-o, --[no-]open Open the default browser to complete the login
-v, --verbose Verbose output
--debug=<value> Debug level output
DESCRIPTION
Log in with a certain Adobe IMS context and returns the access token.
If the Adobe IMS context already has a valid access token set (valid meaning
at least 10 minutes before expiry), that token is returned.
Otherwise, if the Adobe IMS context has a valid refresh token set (valid
meaning at least 10 minutes before expiry) that refresh token is
exchanged for an access token before returning the access token.
Lastly, if the Adobe IMS context properties are supported by one of the
Adobe IMS login plugins, that login plugin is called to guide through
the IMS login process.
The currently supported Adobe IMS login plugins are:
* aio-lib-ims-jwt for JWT token based login supporting
Adobe I/O Console service integrations.
* aio-lib-ims-oauth for browser based OAuth2 login. This
plugin will launch the default browser to guide the user through the
login process. The plugin itself will *never* see the user's
password but only receive the authorization token after the
user has authenticated with Adobe IMS.
ALIASES
$ aio login
aio logout
记录当前或命名为 Adobe 的 IMS 上下文 .
USAGE
$ aio logout [--debug <value>] [-v] [-l | -g] [-c <value>] [-f]
FLAGS
-c, --ctx=<value> Name of the Adobe IMS context to use. Default is the current Adobe IMS context
-f, --[no-]force Invalidate the refresh token as well as all access tokens.
Otherwise only the access token is invalidated. For Adobe IMS
contexts not supporting refresh tokens, this flag has no
effect.
-g, --global global config
-l, --local local config
-v, --verbose Verbose output
--debug=<value> Debug level output
DESCRIPTION
Log out the current or a named Adobe IMS context.
This command can be called multiple times on the same Adobe IMS context with
out causing any errors. The assumption is that after calling this command
without an error, the Adobe IMS context's access and refresh tokens have been
invalidated and removed from persistent storage. Repeatedly calling this
command will just do nothing.
ALIASES
$ aio logout
捐款
欢迎捐款! 读取 贡献指南 更多信息.
许可证发放
这个项目根据Apache V2许可证获得许可. 见 自由主义 更多信息.