xk6-oauth-pkce
is a k6 extension provides the capability to generate OAuth PKCE code verifier and code challenge.
To build a k6
binary with this extension, install xk6 and build your custom k6 binary with the this extension:
- Install
xk6
:
$ go install go.k6.io/xk6/cmd/xk6@latest
- Build the binary:
$ xk6 build --with github.com/johndwalker/xk6-oauth-pkce@latest
import pkce from 'k6/x/oauth-pkce'
export default function () {
const verifier = pkce.create("S256")
console.log(verifier)
console.log(verifier.verifier)
console.log(verifier.challenge)
}