Class: DuoUniversalRails::Constant

Inherits:
Object
  • Object
show all
Defined in:
lib/duo_universal_rails/constant.rb

Constant Summary collapse

CLIENT_ID_LENGTH =
20
CLIENT_SECRET_LENGTH =
40
JTI_LENGTH =
36
MINIMUM_STATE_LENGTH =
22
MAXIMUM_STATE_LENGTH =
1024
STATE_LENGTH =
36
SUCCESS_STATUS_CODE =
200
FIVE_MINUTES_IN_SECONDS =
300
LEEWAY =

One minute in seconds

60
SIG_ALGORITHM =
'HS512'
ERR_USERNAME =
'The username is invalid.'
ERR_NONCE =
'The nonce is invalid.'
ERR_CLIENT_ID =
'The Duo client id is invalid.'
ERR_CLIENT_SECRET =
'The Duo client secret is invalid.'
ERR_API_HOST =
'The Duo api host is invalid'
ERR_REDIRECT_URI =
'No redirect uri'
ERR_CODE =
'Missing authorization code'
ERR_UNKNOWN =
'An unknown error has occurred.'
ERR_GENERATE_LEN =
'Length needs to be at least 22'
OAUTH_V1_HEALTH_CHECK_ENDPOINT =

API_HOST_URI_FORMAT = “https://{}”

"/oauth/v1/health_check"
OAUTH_V1_AUTHORIZE_ENDPOINT =
"/oauth/v1/authorize"
OAUTH_V1_TOKEN_ENDPOINT =
"/oauth/v1/token"
CLIENT_ASSERT_TYPE =

DEFAULT_CA_CERT_PATH = os.path.join(os.path.dirname(__file__), ‘ca_certs.pem’)

"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"