Admin::getUserCredentialsFromCookie

Description

In BBj 11.0 and higher, this method returns user credentials stored in a cookie for the current user.

Syntax

Return Value

Method

UserCredentials

getUserCredentialsFromCookie()

Parameters

None.

Return Values

Returns a UserCredentials object with the user information stored in a cookie that is associated with the current user. If a cookie does not exist, then null() is returned.

Remarks

None.

Example

rem Admin Utility Demo

 rem Use Statements
 use ::admin.bbj::Admin
 use ::admin.bbj::UserCredentials

 rem Declares
 declare Admin admin!
 declare UserCredentials userCredentials!

 rem Authenticate the user jsmith
 admin! = new Admin()
 admin!.setUser("jsmith")
 userCredentials! = admin!.getUserCredentials()
 if (userCredentials! <> null())
    print "User: " + userCredentials!.getUser()
    print "Password: " + userCredentials!.getPassword()
    print "Host: " + userCredentials!.getHost()
    print "Port: " + str(userCredentials!.getPort())
    print "SSL: " + str(userCredentials!.getSSL())
    print "Timeout: " + str(userCredentials!.getTimeout())
    end
 else
    print "Could not authenticate user"
 endif
 end 

See Also

BBj Object Syntax

Admin

Admin API