cConsumerConsumer key from protected configuration.
AdvPL GuideFWoAuthClient():New(cConsumer,cSecret,oURL,[cCallback])Configures a documented OAuth-client stage.
OAuth client configured with consumer, secret, URLs, tokens and signing settings. Documented HTTP/request/authorization stages do not establish OAuth 2 automatic refresh-token handling. RequestToken can populate token and secret token; setters merely assign object values rather than proving a provider grant. This example wraps construction without requesting tokens, consuming endpoints or logging secrets. (Sources: refs. 1–1.)
FWoAuthClient():New(cConsumer,cSecret,oURL,[cCallback])cConsumerConsumer key from protected configuration.
cSecretConsumer secret; never log it.
oURLConfigured FWoAuthURL instance.
cCallbackProvider-registered callback when applicable.
FWoAuthClient():New(cConsumer,cSecret,oURL,[cCallback])o:SetToken(cToken) / o:SetSecretToken(cSecretToken)o:RequestToken()#Include "Protheus.ch"
User Function Ed442()
Local bPrepare := {|cKey,cSecret,oUrls,cCallback| FWoAuthClient():New(cKey,cSecret,oUrls,cCallback)}
// Do not evaluate: configuration comes from protected storage.
Return NilPrepared configuration without authentication or external communication. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.