Forum Discussion
Parsing the Token from the password field in Edge Client
We have a scenario where the F5 Custom Client is using the API call for "OpenSession( )" which only has two fields for credential mapping. Username and Password. We are also using a token and inputting the password with the token at the end. For example username: boo password: 12345678123456
The 1-8 is the LDAP password and the 1-6 is the token password. What would the mcget statement look like in the variable assignemnt box to parse and store the values?
1 Reply
- Stanislas_Piro2
Cumulonimbus
Hi,
is the password length 14 characters? do or the only fixed length is the token?
you can use the following
session.logon.last.ldappassword (secure)=
set password [mcget -secure {session.logon.last.password}]; set tokenid [expr {[string length $password] -6 }]; set ldappassword [string range $password 0 $tokenid-1]; unset password tokens; return $ldappassword;session.logon.last.tokenpassword (secure)=
set password [mcget -secure {session.logon.last.password}]; set tokenid [expr {[string length $password] -6 }]; set tokenpassword [string range $password $tokenid end]; unset password tokens; return $tokenpassword;Edit : I added semicolon at the end of each line. when editing expression, commands are set on one line.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com