nsc auth check-login verifies that you are currently authenticated and that your session is still valid.
When everything is valid, it exits with code 0. When there is a problem it will exit with a non-zero exit code.
This is useful for scripts that need to check for a valid login.
Usage
Examples
Logged in:
Output
Not logged in:
Output
Options
—duration
Checks whether the current session can issue credentials valid for at least this duration. Defaults to5m.
Fails if the current session is expired, revoked, or too close to expiration.