I successed in cas 4.2.x via this document:
https://apereo.github.io/cas/4.2.x/installation/Configuring-LongTerm-Authentication.html
many changes in cas 5.1.x ,now I want to upgrade to 5.1.x . Readed many documents,but still confused. like . where is <var name="credential" class="org.jasig.cas.authentication.UsernamePasswordCredential"/>
etc.
I don't know how to config it . any one master it? or tell me the document where it is . Thanks.
Since you asked about the document and its location, the guide is here
https://apereo.github.io/cas/5.1.x/installation/Configuring-LongTerm-Authentication.html
Follow the guide and adjust your settings appropriately. There is no need for xml.