gluu
|
関数 | |
def | _hmac_sha1 (key, msg) |
def | _sign_vals (key, vals, prefix, expire) |
def | _parse_vals (key, val, prefix, ikey) |
def | _sign_request (ikey, skey, akey, username, prefix) |
def | sign_request (ikey, skey, akey, username) |
def | sign_enroll_request (ikey, skey, akey, username) |
def | _verify_response (ikey, skey, akey, prefix, sig_response) |
def | verify_response (ikey, skey, akey, sig_response) |
def | verify_enroll_response (ikey, skey, akey, sig_response) |
変数 | |
string | DUO_PREFIX = 'TX' |
string | APP_PREFIX = 'APP' |
string | AUTH_PREFIX = 'AUTH' |
string | ENROLL_PREFIX = 'ENROLL' |
string | ENROLL_REQUEST_PREFIX = 'ENROLL_REQUEST' |
int | DUO_EXPIRE = 300 |
int | APP_EXPIRE = 3600 |
int | IKEY_LEN = 20 |
int | SKEY_LEN = 40 |
int | AKEY_LEN = 40 |
string | ERR_USER = 'ERR|The username passed to sign_request() is invalid.' |
string | ERR_IKEY = 'ERR|The Duo integration key passed to sign_request() is invalid.' |
string | ERR_SKEY = 'ERR|The Duo secret key passed to sign_request() is invalid.' |
string | ERR_AKEY = 'ERR|The application secret key passed to sign_request() must be at least %s characters.' % AKEY_LEN |
string | ERR_UNKNOWN = 'ERR|An unknown error has occurred.' |
|
private |
|
private |
|
private |
Generate a signed request for Duo authentication. The returned value should be passed into the Duo.init() call in the rendered web page used for Duo authentication. Arguments: ikey -- Duo integration key skey -- Duo secret key akey -- Application secret key username -- Primary-authenticated username prefix -- DUO_PREFIX or ENROLL_REQUEST_PREFIX
|
private |
|
private |
Validate the signed response returned from Duo. Returns the username of the authenticated user, or None. Arguments: ikey -- Duo integration key skey -- Duo secret key akey -- Application secret key prefix -- AUTH_PREFIX or ENROLL_PREFIX that sig_response must match sig_response -- The signed response POST'ed to the server
def duo_web.sign_enroll_request | ( | ikey, | |
skey, | |||
akey, | |||
username | |||
) |
Generate a signed request for Duo authentication. The returned value should be passed into the Duo.init() call in the rendered web page used for Duo authentication. Arguments: ikey -- Duo integration key skey -- Duo secret key akey -- Application secret key username -- Primary-authenticated username
def duo_web.sign_request | ( | ikey, | |
skey, | |||
akey, | |||
username | |||
) |
Generate a signed request for Duo authentication. The returned value should be passed into the Duo.init() call in the rendered web page used for Duo authentication. Arguments: ikey -- Duo integration key skey -- Duo secret key akey -- Application secret key username -- Primary-authenticated username
def duo_web.verify_enroll_response | ( | ikey, | |
skey, | |||
akey, | |||
sig_response | |||
) |
Validate the signed response returned from Duo. Returns the username of the enrolled user, or None. Arguments: ikey -- Duo integration key skey -- Duo secret key akey -- Application secret key sig_response -- The signed response POST'ed to the server
def duo_web.verify_response | ( | ikey, | |
skey, | |||
akey, | |||
sig_response | |||
) |
Validate the signed response returned from Duo. Returns the username of the authenticated user, or None. Arguments: ikey -- Duo integration key skey -- Duo secret key akey -- Application secret key sig_response -- The signed response POST'ed to the server
int duo_web.AKEY_LEN = 40 |
int duo_web.APP_EXPIRE = 3600 |
string duo_web.APP_PREFIX = 'APP' |
string duo_web.AUTH_PREFIX = 'AUTH' |
int duo_web.DUO_EXPIRE = 300 |
string duo_web.DUO_PREFIX = 'TX' |
string duo_web.ENROLL_PREFIX = 'ENROLL' |
string duo_web.ENROLL_REQUEST_PREFIX = 'ENROLL_REQUEST' |
string duo_web.ERR_AKEY = 'ERR|The application secret key passed to sign_request() must be at least %s characters.' % AKEY_LEN |
string duo_web.ERR_IKEY = 'ERR|The Duo integration key passed to sign_request() is invalid.' |
string duo_web.ERR_SKEY = 'ERR|The Duo secret key passed to sign_request() is invalid.' |
string duo_web.ERR_UNKNOWN = 'ERR|An unknown error has occurred.' |
string duo_web.ERR_USER = 'ERR|The username passed to sign_request() is invalid.' |
int duo_web.IKEY_LEN = 20 |
int duo_web.SKEY_LEN = 40 |