Iddawc
Handle the flow of OAuth2 and OpenID Connect authentication process from the client side.
|
Macros | |
#define | I_OK 0 |
Success. More... | |
#define | I_ERROR 1 |
Error. More... | |
#define | I_ERROR_PARAM 2 |
Error in parameters. More... | |
#define | I_ERROR_MEMORY 3 |
Memory error. More... | |
#define | I_ERROR_UNAUTHORIZED 4 |
Request unauthorized. More... | |
#define | I_ERROR_SERVER 5 |
Server error. More... | |
#define | I_RESPONSE_TYPE_NONE 0x00000000 |
No response type. More... | |
#define | I_RESPONSE_TYPE_CODE 0x00000001 |
Response type code. More... | |
#define | I_RESPONSE_TYPE_TOKEN 0x00000010 |
Response type token. More... | |
#define | I_RESPONSE_TYPE_ID_TOKEN 0x00000100 |
Response type id_token. More... | |
#define | I_RESPONSE_TYPE_PASSWORD 0x00001000 |
Grant type password. More... | |
#define | I_RESPONSE_TYPE_CLIENT_CREDENTIALS 0x00010000 |
Grant type client_credentials. More... | |
#define | I_RESPONSE_TYPE_REFRESH_TOKEN 0x00100000 |
Grant type refresh_token. More... | |
#define | I_RESPONSE_TYPE_DEVICE_CODE 0x01000000 |
Grant type urn:ietf:params:oauth:grant-type:device_code. More... | |
#define | I_AUTH_METHOD_GET 0x00000001 |
access auth endpoint using GET method More... | |
#define | I_AUTH_METHOD_POST 0x00000010 |
access auth endpoint using POST method More... | |
#define | I_AUTH_METHOD_JWT_SIGN_SECRET 0x00000100 |
access auth endpoint using a JWT signed with the client secret More... | |
#define | I_AUTH_METHOD_JWT_SIGN_PRIVKEY 0x00001000 |
access auth endpoint using a JWT signed with the client private key More... | |
#define | I_AUTH_METHOD_JWT_ENCRYPT_SECRET 0x00010000 |
access auth endpoint using a JWT encrypted with the client secret More... | |
#define | I_AUTH_METHOD_JWT_ENCRYPT_PUBKEY 0x00100000 |
access auth endpoint using a JWT encrypted with the client private key More... | |
#define | I_TOKEN_AUTH_METHOD_SECRET_BASIC 0 |
access token endpoint using HTTP basic auth with client_id and client password More... | |
#define | I_TOKEN_AUTH_METHOD_SECRET_POST 1 |
access token endpoint using secret send in POST parameters More... | |
#define | I_TOKEN_AUTH_METHOD_SECRET_JWT 2 |
access token endpoint using a JWT signed with the client secret More... | |
#define | I_TOKEN_AUTH_METHOD_PRIVATE_JWT 3 |
access token endpoint using a JWT signed with the client private key More... | |
#define | I_TOKEN_AUTH_METHOD_NONE 4 |
access token endpoint using no authentication More... | |
#define | I_STRICT_NO 0 |
Do not stricly conform to openid config result. More... | |
#define | I_STRICT_YES 1 |
Stricly conform to openid config result. More... | |
#define | I_AUTH_SIGN_ALG_MAX_LENGTH 8 |
Max length of a sign algorithm name. More... | |
#define | I_BEARER_TYPE_HEADER 0 |
Bearer type header, the token will be available in the header. More... | |
#define | I_BEARER_TYPE_BODY 1 |
Bearer type body, the token will be available as a body url-encoded parameter. More... | |
#define | I_BEARER_TYPE_URL 2 |
Bearer type url, the token will be available as a url query parameter. More... | |
#define | I_HEADER_PREFIX_BEARER "Bearer " |
#define | I_HEADER_AUTHORIZATION "Authorization" |
#define | I_BODY_URL_PARAMETER "access_token" |
#define | I_HEADER_DPOP "DPoP" |
Iddawc OAuth2 client library
iddawc.h: structures and functions declarations
Copyright 2019-2020 Nicolas Mora mail@ babe loues t.or g
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; version 2.1 of the License.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GENERAL PUBLIC LICENSE for more details.
You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses/.
Constant values used as input or output
#define I_OK 0 |
Success.
#define I_ERROR 1 |
Error.
#define I_ERROR_PARAM 2 |
Error in parameters.
#define I_ERROR_MEMORY 3 |
Memory error.
#define I_ERROR_UNAUTHORIZED 4 |
Request unauthorized.
#define I_ERROR_SERVER 5 |
Server error.
#define I_RESPONSE_TYPE_NONE 0x00000000 |
No response type.
#define I_RESPONSE_TYPE_CODE 0x00000001 |
Response type code.
#define I_RESPONSE_TYPE_TOKEN 0x00000010 |
Response type token.
#define I_RESPONSE_TYPE_ID_TOKEN 0x00000100 |
Response type id_token.
#define I_RESPONSE_TYPE_PASSWORD 0x00001000 |
Grant type password.
#define I_RESPONSE_TYPE_CLIENT_CREDENTIALS 0x00010000 |
Grant type client_credentials.
#define I_RESPONSE_TYPE_REFRESH_TOKEN 0x00100000 |
Grant type refresh_token.
#define I_RESPONSE_TYPE_DEVICE_CODE 0x01000000 |
Grant type urn:ietf:params:oauth:grant-type:device_code.
#define I_AUTH_METHOD_GET 0x00000001 |
access auth endpoint using GET method
#define I_AUTH_METHOD_POST 0x00000010 |
access auth endpoint using POST method
#define I_AUTH_METHOD_JWT_SIGN_SECRET 0x00000100 |
access auth endpoint using a JWT signed with the client secret
#define I_AUTH_METHOD_JWT_SIGN_PRIVKEY 0x00001000 |
access auth endpoint using a JWT signed with the client private key
#define I_AUTH_METHOD_JWT_ENCRYPT_SECRET 0x00010000 |
access auth endpoint using a JWT encrypted with the client secret
#define I_AUTH_METHOD_JWT_ENCRYPT_PUBKEY 0x00100000 |
access auth endpoint using a JWT encrypted with the client private key
#define I_TOKEN_AUTH_METHOD_SECRET_BASIC 0 |
access token endpoint using HTTP basic auth with client_id and client password
#define I_TOKEN_AUTH_METHOD_SECRET_POST 1 |
access token endpoint using secret send in POST parameters
#define I_TOKEN_AUTH_METHOD_SECRET_JWT 2 |
access token endpoint using a JWT signed with the client secret
#define I_TOKEN_AUTH_METHOD_PRIVATE_JWT 3 |
access token endpoint using a JWT signed with the client private key
#define I_TOKEN_AUTH_METHOD_NONE 4 |
access token endpoint using no authentication
#define I_STRICT_NO 0 |
Do not stricly conform to openid config result.
#define I_STRICT_YES 1 |
Stricly conform to openid config result.
#define I_AUTH_SIGN_ALG_MAX_LENGTH 8 |
Max length of a sign algorithm name.
#define I_BEARER_TYPE_HEADER 0 |
Bearer type header, the token will be available in the header.
#define I_BEARER_TYPE_BODY 1 |
Bearer type body, the token will be available as a body url-encoded parameter.
#define I_BEARER_TYPE_URL 2 |
Bearer type url, the token will be available as a url query parameter.
#define I_HEADER_PREFIX_BEARER "Bearer " |
#define I_HEADER_AUTHORIZATION "Authorization" |
#define I_BODY_URL_PARAMETER "access_token" |
#define I_HEADER_DPOP "DPoP" |
enum i_option |
Options available to set or get properties using i_set_int_parameter, i_set_str_parameter, i_get_int_parameter or i_get_str_parameter