如何从参数字段中随机化数值并使用?

huangapple go评论71阅读模式
英文:

how to randomize value from parameter field and use?

问题

Hello, 我想提取这个客户端ID并在同一个地方使用它,该地方也在同一个地方生成。我该如何做呢?如果可能的话,请提供任何方法。

英文:

如何从参数字段中随机化数值并使用?

Hello,
i want to extract this client id and use it on the same place which is also generating in the same place.how can i do it. please provide any way if possible

答案1

得分: 0

你确定你理解这个 client_id 是什么意思吗?

我的期望是你不应该去碰它,保持原样。

根据文档

客户端标识 (Client ID)

client_id 是应用程序的公共标识符。尽管它是公开的,最好不要被第三方猜测,因此许多实现会使用类似于 32 个字符的十六进制字符串。如果客户端 ID 可以被猜测,那么就会稍微容易些来构建针对任意应用程序的网络钓鱼攻击。它还必须在授权服务器处理的所有客户端中保持唯一。

以下是一些支持 OAuth 2.0 的服务的客户端标识示例:

  • Foursquare: ZYDPLLBWSK3MVQJSIYHB1OR2JXCY0X2C5UJ2QAR2MAAIT5Q
  • Github: 6779ef20e75817b79602
  • Google: 292085223830.apps.googleusercontent.com
  • Instagram: f2a1ed52710d4533bde25be6da03b6e3
  • SoundCloud: 269d98e4922fb3895e9ae2108cbb5064
  • Windows Live: 00000000400ECB04
  • Okta: 0oa2hl2inow5Uqc6c357

如果你在脚本中的多个地方使用了这个 client_id,并且想要遵循 DRY 原则,你可以在用户定义的变量中声明它。

英文:

Are you sure you understand what does this client_id mean?

My expectation is that you shouldn't touch it, leave it as it is.

As per documentation

>Client ID
>
>The client_id is a public identifier for apps. Even though it’s public, it’s best that it isn’t guessable by third parties, so many implementations use something like a 32-character hex string. If the client ID is guessable, it makes it slightly easier to craft phishing attacks against arbitrary applications. It must also be unique across all clients that the authorization server handles.
>
>Here are some examples of client IDs from services that support OAuth 2.0:
>
> - Foursquare: ZYDPLLBWSK3MVQJSIYHB1OR2JXCY0X2C5UJ2QAR2MAAIT5Q
> - Github: 6779ef20e75817b79602
> - Google: 292085223830.apps.googleusercontent.com
> - Instagram: f2a1ed52710d4533bde25be6da03b6e3
> - SoundCloud: 269d98e4922fb3895e9ae2108cbb5064
> - Windows Live: 00000000400ECB04
> - Okta: 0oa2hl2inow5Uqc6c357

If you're using this client_id in multiple places in your script and want to declare it once to follow DRY principle - you can do this in User Defined Variables

huangapple
  • 本文由 发表于 2023年7月27日 23:29:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/76781314.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定