- GraphQL Type Registration
- Authentication
- Secrets & Tokens
graphql_login_jwt_secret_key
graphql_login_refresh_token_validity
graphql_login_refresh_token_expiration_timestamp
graphql_login_user_secret
graphql_login_iss_allowed_domains
graphql_login_edit_jwt_capability
graphql_login_token_not_before_timestamp
graphql_login_token_expiration_timestamp
graphql_login_token_before_sign
graphql_login_signed_token
graphql_login_token_validity
- Authorization Headers
- Client & Provider Configuration
graphql_login_registered_provider_configs
graphql_login_provider_config_instances
- `graphql_login_client_options_fields
graphql_login_client_options_schema
graphql_login_setting
graphql_login_access_control_settings
graphql_login_provider_settings
graphql_login_login_options_fields
graphql_login_login_options_schema
graphql_login_client_options
- `graphql_login_user_types
Filters the list of classes that are registered as GraphQL Types.
Possible type
values are connection
, enum
, field
, input
, interface
, mutation
and object
.
apply_filters( 'graphql_login_registered_connection_classes', $classes );
apply_filters( 'graphql_login_registered_enum_classes', $classes );
apply_filters( 'graphql_login_registered_field_classes', $classes );
apply_filters( 'graphql_login_registered_input_classes', $classes );
apply_filters( 'graphql_login_registered_interface_classes', $classes );
apply_filters( 'graphql_login_registered_mutation_classes', $classes );
apply_filters( 'graphql_login_registered_object_classes', $classes );
$classes
(array) : The list of PHP classes that are registered as GraphQL Types. These classes must extend theWPGraphQL\Login\Vendor\AxeWP\GraphQL\Interfaces\GraphQLType
interface.
Filters the user data returned from the Authentication provider.
apply_filters( 'graphql_login_authenticated_user_data', $user_data, $slug, $input, $settings, $provider_config, $client );
$user_data
(array|\WP_User|\WP_Error|false) : The user data returned from the Authentication provider.$slug
(string) : The provider slug.$input
(array) : The mutation input data.$settings
(array) : The client settings.$provider_config
(\WPGraphQL\Login\Auth\ProviderConfig\ProviderConfig) : The instance of the ProviderConfig.$client
(WPGraphQL\Login\Auth\Client) : The authentication client.
Shortcircuits the user matching logic, allowing you to provide your own logic for matching the user from the provider user data. If null is returned, the default matching logic will be used.
apply_filters( 'graphql_login_pre_get_user_from_data', null, $user_data, $slug, $settings, $provider_config, $client );
$user
(WP_User|null) : The user that was matched from the provider user data. If null, the default matching logic will be used.$user_data
(array|\WP_User|\WP_Error|false) : The user data returned from the Authentication provider.$slug
(string) : The provider slug.$settings
(array) : The client settings.$provider_config
(\WPGraphQL\Login\Auth\ProviderConfig\ProviderConfig) : The instance of the ProviderConfig.$client
(WPGraphQL\Login\Auth\Client) : The authentication client.
Filters the user data mapped from the Authentication provider before creating the user. Useful for mapping custom fields from the Authentication provider to the WP_User.
apply_filters( 'graphql_login_create_user_data', $user_data, $client );
$user_data
(array) : The user data returned from the Authentication provider.$client
(WPGraphQL\Login\Auth\Client) : The authentication client.
Filters the Login mutation payload before returning.
apply_filters( 'graphql_login_payload', $payload, $user, $user_data, $client );
$payload
(array) : The Login mutation payload.$user
(WP_User) : The authenticated user.$user_data
(array) : The user data returned from the authentication provider.$client
(WPGraphQL\Login\Auth\Client) : The authentication client.
Filter the secret key used to sign the JWT auth and refresh tokens.
apply_filters( 'graphql_login_jwt_secret_key', $secret );
$secret
(string) : The secret key.
Filters the duration for which a Refresh Token should be considered valid.
apply_filters( 'graphql_login_refresh_token_validity', $validity );
$validity
(int) : The validity in seconds. Defaults to 1 year.
Filters the Refresh Token expiration timestamp for all users.
apply_filters( 'graphql_login_refresh_token_expiration_timestamp', $timestamp );
$timestamp
(int) : The expiration timestamp.
Filter the user secret before returning it, allowing for individual systems to override what's returned.
apply_filters( 'graphql_login_user_secret', $secret, $user_id );
$secret
(string|WP_Error) : The user secret.$user_id
(int) : The user ID.
Filter the allowed domains for the token. This is useful if you want to make your token valid over several domains.
apply_filters( 'graphql_login_iss_allowed_domains', $allowed_domains );
$allowed_domains
(string[]) : An array of allowed domains.
Filter the capability that is tied to editing/viewing user OAuth info.
apply_filters( 'graphql_login_edit_jwt_capability', $capability );
$capability
(string) : The user capability. Defaults to'edit_users'
.
Determines the "not before" value for the user's auth and refresh tokens.
apply_filters( 'graphql_login_token_not_before_timestamp', $issued, $user );
$issued
(int) : The timestamp of the authentication used in the token`.$user
(WP_User) : The authenticated user.
Determines the "not before" value for the user's auth and refresh tokens.
apply_filters( 'graphql_login_token_expiration_timestamp', $issued, $user );
$issued
(int) : The timestamp of the authentication used in the token`.$user
(WP_User) : The authenticated user.
Filters the token before it is signed, allowing for individual systems to configure the token as needed.
apply_filters( 'graphql_login_token_before_sign', $token, $user );
$token
(array) : The token array that will be encoded.$user
(WP_User) : The authenticated user.
Filter the token before returning it, allowing for individual systems to override what's returned. For example, if the user should not be granted a token for whatever reason, a filter could have the token return null.
apply_filters( 'graphql_login_signed_token', $token, $user_id );
$token
(string) : The signed JWT token that will be returned.$user_id
(int) : The ID of the user the JWT is associated with.
Filter the validity length for the token. Defaults to 300 seconds.
apply_filters( 'graphql_login_token_validity', $validity );
$validity
(int) : The validity length (in seconds)
Filters the Authorization header before it is used to authenticate the user's HTTP request.
apply_filters( 'graphql_login_auth_header', $auth_header );
$auth_header
(string) : The header used to authenticate a user's HTTP request.
Filters the Refresh Authorization header before it is used to authenticate the user's HTTP request.
apply_filters( 'graphql_login_refresh_header', $refresh_header );
$refresh_header
(string) : The refresh header.
Filters the registered provider configurations. Useful for removing a built-in provider, or for adding a custom one.
apply_filters( 'graphql_login_registered_provider_configs', $provider_configs);
$provider_configs
(array) : The registeredProviderConfig
classes, keyed to their slug.
Filters the list of enabled ProviderConfig instances.
apply_filters( `graphql_login_provider_config_instances', $provider_configs );
$provider_configs
(WPGQL\Login\Auth\ProviderConfig\ProviderConfig[]) : The list of enabled ProviderConfig instances.
Filters the GraphQL fields for the provider's Client Options.
apply_filters( 'graphql_login_client_options_fields', $fields, $slug );
apply_filters( 'graphql_login_{$slug}_client_options_fields', $fields );
$fields
(array) : An array of WPGraphQL field $configs.$slug
(string) : The Authentication provider slug.
Filters the WP REST schema for the provider's Client Options settings. Useful for modifying Client Options displayed in the admin.
apply_filters( 'graphql_login_client_options_schema', $settings, $slug );
apply_filters( 'graphql_login_{$slug}_client_options_fields', $settings );
$settings
(array) : The WP REST schema config, with the addition of the 'help' and 'required' key/values used when displaying the settings in the Admin.$slug
(string) : The Authentication provider slug.
Filters the value of a setting.
apply_filters( 'graphql_login_setting', $value, $option_name, $default );
$value
(mixed) : The value of the setting.$option_name
(string) : The name of the setting. In the database, this is prefixed withwpgraphql_login_settings
$default
(mixed) : The default value of the setting.
Filters the settings for a provider.
apply_filters( 'graphql_login_access_control_settings', $settings, $slug );
$settings
(array) : The access control settings.$default
(string) : The default value if none is set.
Filters the settings for a provider.
apply_filters( 'graphql_login_provider_settings', $settings, $slug );
$settings
(array) : The settings for the provider.$slug
(string) : The provider slug.
Filters the GraphQL fields for the provider's Login Options.
apply_filters( 'graphql_login_login_options_fields', $fields, $slug );
apply_filters( 'graphql_login_{$slug}_login_options_fields', $fields );
$fields
(array) : An array of WPGraphQL field $configs.$slug
(string) : The Authentication provider slug.
Filters the WP REST schema for the provider's Client Options settings. Useful for modifying Client Options displayed in the admin.
apply_filters( 'graphql_login_login_options_schema', $settings, $slug );
apply_filters( 'graphql_login_{$slug}_login_options_fields', $settings );
$settings
(array) : The WP REST schema config, with the addition of the 'help' and 'required' key/values used when displaying the settings in the Admin.$slug
(string) : The Authentication provider slug.
Filters the options used to configure the OAuth2 provider instance within the ProviderConfig.
apply_filters( 'graphql_login_client_options', $options, $slug );
$options
(array) : The provider options stored in the database.$slug
(string) : The authentication provider slug.
Filters the GraphQL User
types which should have the auth: AuthenticationData
field added to them.
apply_filters( 'graphql_login_user_types', $type_names);
$type_names
(string[]) : The names of the GraphQL 'user' types. Defaults to 'User'