28.4 VALIDATE Procedure
This procedure validates the given token.
Syntax
PROCEDURE VALIDATE (
p_token IN t_token,
p_iss IN VARCHAR2 DEFAULT NULL,
p_aud IN VARCHAR2 DEFAULT NULL,
p_leeway_seconds IN PLS_INTEGER DEFAULT 0 );
Parameters
Table 28-4 VALIDATE Procedure Parameters
Parameter | Description |
---|---|
|
The JWT. |
|
If not null, verify that the |
|
If not null, verify that the single |
|
Fudge factor (in seconds) for comparing |
Raises
APEX.ERROR.INTERNAL
: Validation failed, check debug log for details.
Example
Verify that l_value
is a valid OpenID
ID token.
declare
l_value varchar2(4000) := 'eyJ0 ... NiJ9.eyJ1c ... I6IjIifX0.DeWt4Qu ... ZXso';
l_oauth2_client_id varchar2(30) := '...';
l_token apex_jwt.t_token;
begin
l_token := apex_jwt.decode (
p_value => l_value );
apex_jwt.validate (
p_token => l_token,
p_aud => l_oauth2_client_id );
end;
Parent topic: APEX_JWT