Skip to content

/AWS1/IF_BDO=>GETOAUTH2CREDENTIALPROVIDER()

About GetOauth2CredentialProvider

Retrieves information about an OAuth2 credential provider.

Method Signature

IMPORTING

Required arguments:

iv_name TYPE /AWS1/BDOCREDPROVIDERNAME /AWS1/BDOCREDPROVIDERNAME

The name of the OAuth2 credential provider to retrieve.

RETURNING

oo_output TYPE REF TO /aws1/cl_bdogeto2credpvdrrsp /AWS1/CL_BDOGETO2CREDPVDRRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_bdo~getoauth2credentialprovider( |string| ).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_secret = lo_result->get_clientsecretarn( ).
  IF lo_secret IS NOT INITIAL.
    lv_secretarn = lo_secret->get_secretarn( ).
  ENDIF.
  lv_credentialprovidername = lo_result->get_name( ).
  lv_credentialproviderarnty = lo_result->get_credentialproviderarn( ).
  lv_credentialprovidervendo = lo_result->get_credentialprovidervendor( ).
  lo_oauth2providerconfigout = lo_result->get_oauth2pvdrconfigoutput( ).
  IF lo_oauth2providerconfigout IS NOT INITIAL.
    lo_customoauth2providercon = lo_oauth2providerconfigout->get_customoauth2pvdrconfig( ).
    IF lo_customoauth2providercon IS NOT INITIAL.
      lo_oauth2discovery = lo_customoauth2providercon->get_oauthdiscovery( ).
      IF lo_oauth2discovery IS NOT INITIAL.
        lv_discoveryurltype = lo_oauth2discovery->get_discoveryurl( ).
        lo_oauth2authorizationserv = lo_oauth2discovery->get_authservermetadata( ).
        IF lo_oauth2authorizationserv IS NOT INITIAL.
          lv_issuerurltype = lo_oauth2authorizationserv->get_issuer( ).
          lv_authorizationendpointty = lo_oauth2authorizationserv->get_authorizationendpoint( ).
          lv_tokenendpointtype = lo_oauth2authorizationserv->get_tokenendpoint( ).
          LOOP AT lo_oauth2authorizationserv->get_responsetypes( ) into lo_row.
            lo_row_1 = lo_row.
            IF lo_row_1 IS NOT INITIAL.
              lv_responsetype = lo_row_1->get_value( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDIF.
    lo_googleoauth2providercon = lo_oauth2providerconfigout->get_googleoauth2pvdrconfig( ).
    IF lo_googleoauth2providercon IS NOT INITIAL.
      lo_oauth2discovery = lo_googleoauth2providercon->get_oauthdiscovery( ).
      IF lo_oauth2discovery IS NOT INITIAL.
        lv_discoveryurltype = lo_oauth2discovery->get_discoveryurl( ).
        lo_oauth2authorizationserv = lo_oauth2discovery->get_authservermetadata( ).
        IF lo_oauth2authorizationserv IS NOT INITIAL.
          lv_issuerurltype = lo_oauth2authorizationserv->get_issuer( ).
          lv_authorizationendpointty = lo_oauth2authorizationserv->get_authorizationendpoint( ).
          lv_tokenendpointtype = lo_oauth2authorizationserv->get_tokenendpoint( ).
          LOOP AT lo_oauth2authorizationserv->get_responsetypes( ) into lo_row.
            lo_row_1 = lo_row.
            IF lo_row_1 IS NOT INITIAL.
              lv_responsetype = lo_row_1->get_value( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDIF.
    lo_githuboauth2providercon = lo_oauth2providerconfigout->get_githuboauth2pvdrconfig( ).
    IF lo_githuboauth2providercon IS NOT INITIAL.
      lo_oauth2discovery = lo_githuboauth2providercon->get_oauthdiscovery( ).
      IF lo_oauth2discovery IS NOT INITIAL.
        lv_discoveryurltype = lo_oauth2discovery->get_discoveryurl( ).
        lo_oauth2authorizationserv = lo_oauth2discovery->get_authservermetadata( ).
        IF lo_oauth2authorizationserv IS NOT INITIAL.
          lv_issuerurltype = lo_oauth2authorizationserv->get_issuer( ).
          lv_authorizationendpointty = lo_oauth2authorizationserv->get_authorizationendpoint( ).
          lv_tokenendpointtype = lo_oauth2authorizationserv->get_tokenendpoint( ).
          LOOP AT lo_oauth2authorizationserv->get_responsetypes( ) into lo_row.
            lo_row_1 = lo_row.
            IF lo_row_1 IS NOT INITIAL.
              lv_responsetype = lo_row_1->get_value( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDIF.
    lo_slackoauth2providerconf = lo_oauth2providerconfigout->get_slackoauth2pvdrconfig( ).
    IF lo_slackoauth2providerconf IS NOT INITIAL.
      lo_oauth2discovery = lo_slackoauth2providerconf->get_oauthdiscovery( ).
      IF lo_oauth2discovery IS NOT INITIAL.
        lv_discoveryurltype = lo_oauth2discovery->get_discoveryurl( ).
        lo_oauth2authorizationserv = lo_oauth2discovery->get_authservermetadata( ).
        IF lo_oauth2authorizationserv IS NOT INITIAL.
          lv_issuerurltype = lo_oauth2authorizationserv->get_issuer( ).
          lv_authorizationendpointty = lo_oauth2authorizationserv->get_authorizationendpoint( ).
          lv_tokenendpointtype = lo_oauth2authorizationserv->get_tokenendpoint( ).
          LOOP AT lo_oauth2authorizationserv->get_responsetypes( ) into lo_row.
            lo_row_1 = lo_row.
            IF lo_row_1 IS NOT INITIAL.
              lv_responsetype = lo_row_1->get_value( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDIF.
    lo_salesforceoauth2provide = lo_oauth2providerconfigout->get_sforceoauth2pvdrconfig( ).
    IF lo_salesforceoauth2provide IS NOT INITIAL.
      lo_oauth2discovery = lo_salesforceoauth2provide->get_oauthdiscovery( ).
      IF lo_oauth2discovery IS NOT INITIAL.
        lv_discoveryurltype = lo_oauth2discovery->get_discoveryurl( ).
        lo_oauth2authorizationserv = lo_oauth2discovery->get_authservermetadata( ).
        IF lo_oauth2authorizationserv IS NOT INITIAL.
          lv_issuerurltype = lo_oauth2authorizationserv->get_issuer( ).
          lv_authorizationendpointty = lo_oauth2authorizationserv->get_authorizationendpoint( ).
          lv_tokenendpointtype = lo_oauth2authorizationserv->get_tokenendpoint( ).
          LOOP AT lo_oauth2authorizationserv->get_responsetypes( ) into lo_row.
            lo_row_1 = lo_row.
            IF lo_row_1 IS NOT INITIAL.
              lv_responsetype = lo_row_1->get_value( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDIF.
    lo_microsoftoauth2provider = lo_oauth2providerconfigout->get_msftoauth2providerconfig( ).
    IF lo_microsoftoauth2provider IS NOT INITIAL.
      lo_oauth2discovery = lo_microsoftoauth2provider->get_oauthdiscovery( ).
      IF lo_oauth2discovery IS NOT INITIAL.
        lv_discoveryurltype = lo_oauth2discovery->get_discoveryurl( ).
        lo_oauth2authorizationserv = lo_oauth2discovery->get_authservermetadata( ).
        IF lo_oauth2authorizationserv IS NOT INITIAL.
          lv_issuerurltype = lo_oauth2authorizationserv->get_issuer( ).
          lv_authorizationendpointty = lo_oauth2authorizationserv->get_authorizationendpoint( ).
          lv_tokenendpointtype = lo_oauth2authorizationserv->get_tokenendpoint( ).
          LOOP AT lo_oauth2authorizationserv->get_responsetypes( ) into lo_row.
            lo_row_1 = lo_row.
            IF lo_row_1 IS NOT INITIAL.
              lv_responsetype = lo_row_1->get_value( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDIF.
  ENDIF.
  lv_timestamp = lo_result->get_createdtime( ).
  lv_timestamp = lo_result->get_lastupdatedtime( ).
ENDIF.