rest

package
v5.0.0-alpha7 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// DefaultCallbackUrl is the default URL that is registered for cells-client in the Server out of the box.
	DefaultCallbackUrl = "http://localhost:3000/servers/callback"
	// NoBrowserCallbackSuffix is the Uri that is used to display a code that can be copy/pasted by the end user.
	NoBrowserCallbackSuffix = "/oauth2/oob"
)

Variables

This section is empty.

Functions

func GetApiClient

func GetApiClient(sdkConfig *cellssdk.SdkConfig, anonymous bool) (*sdkclient.PydioCellsRestAPI, error)

func GetApiTransport

func GetApiTransport(sdkConfig *cellssdk.SdkConfig, anonymous bool) (*client.Runtime, error)

func OAuthExchangeCode

func OAuthExchangeCode(c *cellssdk.SdkConfig, clientId, code, callbackUrl string) error

OAuthExchangeCode retrieves an AccessToken/RefreshToken pair using the passed OAuth exchange code. It then updates the passed configuration.

func OAuthPrepareUrl

func OAuthPrepareUrl(clientId, state, serverUrl, callbackUrl string) (preparedUrl string, e error)

OAuthPrepareUrl creates a URL that can be opened in a browser or copy/pasted by the end user.

func RefreshJwtToken

func RefreshJwtToken(clientId string, sdkConfig *cellssdk.SdkConfig) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳