我正在尝试对用Vertx编写的Web应用程序实施身份验证。
身份验证通过亚马逊隐身方式进行。
我设法找到了一些示例,并在下面的代码中进行了制作。到目前为止,我面临的问题是如果我访问“ http://localhost:1701/protected”,它会将我定向到“ https://abc.auth.eu-west-1.amazoncognito.com/login?state=%2Fprotected&scope=aws.cognito.signin.user.admin+email+openid+profile&redirect_uri=http%3A%2F%2Flocalhost%3A1700%2Fprotected&response_type=code&client_id=xyz_client_id_xyz”,即使成功登录后,从这里开始,它仍将我重定向到相同的aws网址“ {{ 3}}“
function create_global_attribute($name,$slug)
{
$taxonomy_name = wc_attribute_taxonomy_name( $slug );
if (taxonomy_exists($taxonomy_name))
{
return wc_attribute_taxonomy_id_by_name($slug);
}
//logg("Creating a new Taxonomy! `".$taxonomy_name."` with name/label `".$name."` and slug `".$slug.'`');
$attribute_id = wc_create_attribute( array(
'name' => $name,'slug' => $slug,'type' => 'select','order_by' => 'menu_order','has_archives' => false,) );
//Register it as a wordpress taxonomy for just this session. Later on this will be loaded from the woocommerce taxonomy table.
register_taxonomy(
$taxonomy_name,apply_filters( 'woocommerce_taxonomy_objects_' . $taxonomy_name,array( 'product' ) ),apply_filters( 'woocommerce_taxonomy_args_' . $taxonomy_name,array(
'labels' => array(
'name' => $name,),'hierarchical' => true,'show_ui' => false,'query_var' => true,'rewrite' => false,) )
);
//Clear caches
delete_transient( 'wc_attribute_taxonomies' );
return $attribute_id;
}
有什么建议吗?