Usina BRAdvPL Guide
Sign in
← All topics
CLASSUnder review

FWoAuth1Fluig

FWoAuth1Fluig():New(cConsumer,cSecret,cHost,[cCallback])

Configures a documented OAuth-client stage.

FWoAuth1FluigAdvPL
01 · OVERVIEW

Overview

Specializes FWoAuthClient for Fluig OAuth 1.0 services. GetUsers has a documented 250-record limit. Constructor syntax takes host text while its parameter table mentions oURL; the official example guides this subset without generalizing the inconsistency. Consumer key/secret and token/secret token are distinct pairs. The callback receives protected configuration without persistence, user queries or posted comments. (Sources: refs. 1–2.)

02 · SYNTAX

Syntax

FWoAuth1Fluig():New(cConsumer,cSecret,cHost,[cCallback])

Parameters

cConsumer
CharacterRequired

Consumer key from protected configuration.

cSecret
CharacterRequired

Consumer secret; never log it.

cHost
CharacterRequired

Fluig host; page-table inconsistency explained in overview.

cCallback
CharacterOptional

Provider-registered callback when applicable.

Methods

NewPrepares client configuration.FWoAuth1Fluig():New(cConsumer,cSecret,cHost,[cCallback])
SetToken / SetSecretTokenAssign token values to the object.o:SetToken(cToken) / o:SetSecretToken(cSecretToken)
GetUsersQueries users; unused in the example.o:GetUsers() --> cJson
03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed441()
    Local bPrepare := {|cKey,cSecret,cHost,cCallback| FWoAuth1Fluig():New(cKey,cSecret,cHost,cCallback)}
    // Do not evaluate: configuration comes from protected storage.
Return Nil
Expected result

Prepared configuration without authentication or external communication. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Keep secrets out of source and logs; verify endpoints, signing, permissions and provider behavior before use.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. FWoAuth1Fluig. TDN. Accessed on 2026-10-27.
  2. TOTVS. FWoAuthClient. TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha