我试图用jQuery嵌套标签,一些水平和一些垂直.我发现谷歌代码"垂直标签"项目在这里,并把它纳入我的项目.我的(简化)HTML是:
Run Code Online (Sandbox Code Playgroud)<div class="htab-outer"> <ul>...</ul> <div class="vtab"> <ul>...</ul> <div class="htab-inner"> <ul>...</ul> </div> </div> </div>
我的Javascript看起来像:
$(function() {
$(".htab-outer").tabs();
$(".vtab").tabs().addClass("ui-tabs-vertical ui-helper-clearfix");
$(".vtab li").removeClass("ui-corner-top").addClass("ui-corner-left");
$(".htab-inner").tabs();
// I've tried with and without the following line and noticed no difference
$(".htab-inner").removeClass("ui-tabs-vertical");
});
Run Code Online (Sandbox Code Playgroud)
最后,垂直选项卡CSS是:
.ui-tabs-vertical { width: 55em; }
.ui-tabs-vertical .ui-tabs-nav { padding: .2em .1em .2em .2em; float: left; width: 12em; }
.ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }
.ui-tabs-vertical .ui-tabs-nav …Run Code Online (Sandbox Code Playgroud) 我正在使用 boto3 和授权库来尝试对设备进行身份验证,以在识别后跳过多因素身份验证。我已经通过了用户/密码身份验证,但似乎无法找出验证设备的正确方法。以下是我的代码:
from warrant import aws_srp
from warrant.aws_srp import AWSSRP
import boto3
client = boto3.client('cognito-idp')
import datetime
username='xxx'
password='xxx'
client_id='xxx'
aws = AWSSRP(username=username, password=password, pool_id='xxx',
client_id=client_id, client=client)
auth_init = client.initiate_auth(
AuthFlow='USER_SRP_AUTH',
AuthParameters={
'USERNAME': username,
'SRP_A': aws_srp.long_to_hex(aws.large_a_value),
},
ClientId=client_id,
)
cr = aws.process_challenge(auth_init['ChallengeParameters'])
response = client.respond_to_auth_challenge(
ClientId=client_id,
ChallengeName=auth_init['ChallengeName'],
ChallengeResponses=cr
)
response = client.respond_to_auth_challenge(
ClientId=client_id,
ChallengeName='SMS_MFA',
Session=response['Session'],
ChallengeResponses={
'USERNAME': username,
'SMS_MFA_CODE':'xxx'
}
)
response_dev = client.confirm_device(
AccessToken=response['AuthenticationResult']['AccessToken'],
DeviceKey=response['AuthenticationResult']['NewDeviceMetadata']['DeviceKey'],
DeviceSecretVerifierConfig={
"PasswordVerifier": aws_srp.long_to_hex(aws.large_a_value),
"Salt": aws_srp.long_to_hex(aws.small_a_value)
}
)
response = client.update_device_status(
AccessToken=response['AuthenticationResult']['AccessToken'],
DeviceKey=device,
DeviceRememberedStatus='remembered' …Run Code Online (Sandbox Code Playgroud) python srp-protocol amazon-cognito boto3 multi-factor-authentication
boto3 ×1
css ×1
jquery ×1
jquery-ui ×1
multi-factor-authentication ×1
python ×1
srp-protocol ×1