10.2 SET_ALLOWED_URLS Procedure
This procedure sets a list of URLs that can be used for this credential.
Syntax
PROCEDURE SET_ALLOWED_URLS(
    p_credential_static_id  IN VARCHAR2,
    p_allowed_urls          IN WWV_FLOW_T_VARCHAR2,
    p_client_secret         IN VARCHAR2 );Parameters
| Parameter | Description | 
|---|---|
| p_credential_static_id | The credential static ID. | 
| p_allowed_urls | List of URLs (as APEX_T_VARCHAR2) that these credentials can access. | 
| p_client_secret | Client Secret. If allowed URLs are changed, this must be provided again. | 
Usage Notes
If an HTTP request target URL for these credentials matches one of these URLs, credential usage is allowed. If not, an error is raised.
URLs are matched on a starts-with basis. For example, if p_allowed_urls is passed in as apex_t_varchar2('https://www.oracle.com','https://apex.oracle.com/ords/'),  then the credential can be used for HTTP requests to:
                  
- https://www.oracle.com/
- https://www.oracle.com/myrest/service
- https://apex.oracle.com/ords/secret/workspace
However, the credential is not allowed for requests to:
- https://web.oracle.com
- https://apex.oracle.com/apex/workspace
- http://www.oracle.com/
The Client Secret needs to be provided again if the allowed URLs change. If the client secret is provided as NULL, it will be cleared.
                  
Examples
This example sets allowed URLs for the credential OAuth Login.
                  
begin
    apex_credential.set_allowed_urls (
        p_credential_static_id     'OAuth Login',
        p_allowed_urls             apex_t_varchar2( 
                                       'https://tokenserver.mycompany.com/oauth2/token', 
                                       'https://www.oracle.com' ),
        p_client_secret            '1278672tjksaGSDA789312..' );
end;Parent topic: APEX_CREDENTIAL