# README
⚠️ This repository is now archived. Please use traPtitech/go-traq-oauth2 ⚠️
traq-oauth2
traq-oauth2 provides support for OAuth2 authentication in traQ
Features
- Authorization Code Flow
- Only this flow is supported in traQ.
- Proof Key for Code Exchange
- PKCE is supported in traQ.
- Few dependencies
- traq-oauth2 only depends on golang.org/x/oauth2 and standard libraries.
Installation
package main
import (
// ...
traqoauth2 "github.com/ras0q/traq-oauth2"
)
Usage
See example
# Packages
No description provided by the author
# Functions
CodeChallengeMethodFromStr returns the CodeChallengeMethod from the string.
GenerateCodeChallenge generates the code challenge from the code verifier.
GenerateCodeVerifier generates a code verifier.
NewConfig returns a new oauth2.Config for traQ.
WithCodeChallenge sets the code_challenge parameter.
WithCodeChallengeMethod sets the code_challenge_method parameter.
WithCodeVerifier sets the code_verifier parameter.
# Constants
CodeChallengePlain is the PKCE "plain" method.
CodeChallengeS256 is the PKCE "S256" method.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
Traq is the OAuth2 endpoint for traQ.
# Type aliases
CodeChallengeMethod represents the code challenge method.