This app was mentioned in 3 comments, with an average of 1.33 upvotes
you just need to program an NFC tag with ssid and password data, using InstaWiFi for example, router itself has nothing to do with it, unless you want the NFC tag to be somehow automatically programmed every time you change ssid and password
EDIT: ah, just checked what pn532 is, then it's serious programming involved, I'm not sure it's worth the time invested but of course you will learn something new doing this, which is always valuable!:)
InstaWifi is a app that will write wifi info onto NFC tag if your phone does not support long press wifi ssid tag writing.