hydra

package
v5.0.0-...-4117378 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptLogout

func AcceptLogout(ctx context.Context, challenge string, accessToken string, refreshToken string) error

AcceptLogout forwards call to grpc server

func CreateAuthCode

func CreateAuthCode(ctx context.Context, consent *auth.ID, clientID, redirectURI, codeChallenge, codeChallengeMethod string) (string, error)

CreateAuthCode forwards call to grpc server

func CreateConsent

func CreateConsent(ctx context.Context, loginChallenge string) (*auth.ID, error)

CreateConsent forwards call to grpc server

func CreateLogin

func CreateLogin(ctx context.Context, clientID string, scopes, audiences []string) (*auth.ID, error)

CreateLogin forwards call to grpc server

func CreateLogout

func CreateLogout(ctx context.Context, url, subject, sessionID string) (*auth.ID, error)

CreateLogout forwards call to grpc server

func Exchange

func Exchange(ctx context.Context, code string, verifier string) (*oauth2.Token, error)

Exchange forwards call to grpc server

func GetLogin

func GetLogin(ctx context.Context, challenge string) (*auth.GetLoginResponse, error)

GetLogin forwards call to grpc server

func LoginChallengeCode

func LoginChallengeCode(ctx context.Context, challenge string, claims map[string]string) (*auth.GetLoginResponse, string, error)

LoginChallengeCode forwards call to grpc server

func OAuthConn

OAuthConn resolves a grpc connexion to ServiceOAuth

func PasswordCredentialsCode

func PasswordCredentialsCode(ctx context.Context, username, password, challenge string) (string, error)

PasswordCredentialsCode forwards call to grpc server

func PasswordCredentialsToken

func PasswordCredentialsToken(ctx context.Context, username, password string) (*oauth2.Token, error)

PasswordCredentialsToken forwards call to grpc server

Types

type ConsentResponse

type ConsentResponse struct {
	Challenge                    string   `json:"challenge"`
	Skip                         bool     `json:"skip"`
	Subject                      string   `json:"subject"`
	RequestedScope               []string `json:"requested_scope"`
	RequestedAccessTokenAudience []string `json:"requested_access_token_audience"`
}

type LogoutResponse

type LogoutResponse struct {
	RequestURL  string `json:"request_url"`
	RPInitiated bool   `json:"rp_initiated"`
	SID         string `json:"sid"`
	Subject     string `json:"subject"`
}

type RedirectResponse

type RedirectResponse struct {
	Challenge string `json:"challenge"`
}

func AcceptConsent

func AcceptConsent(ctx context.Context, challenge string, scopes, audiences []string, accessToken, idToken map[string]string) (*RedirectResponse, error)

AcceptConsent forwards call to grpc server

func AcceptLogin

func AcceptLogin(ctx context.Context, challenge string, subject string) (*RedirectResponse, error)

AcceptLogin forwards call to grpc server

type TokenResponse

type TokenResponse struct {
	IDToken      string `json:"id_token"`
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	ExpiresIn    int64  `json:"expires_in"`
}

func Refresh

func Refresh(ctx context.Context, refreshToken string) (*TokenResponse, error)

Refresh forwards call to grpc server

Jump to

Keyboard shortcuts

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