src/main/java/com/initialspark/nhslogin/demo/config/WebSecurityConfig.java
/**
     * This creates the services that signs the outgoing request and validates
     * the ID token's signature.
     *
     * @return
     * @throws Exception
     */
This creates the services that signs the outgoing request and validates
the ID token's signature.

@return
@throws Exception
This creates the services that signs the outgoing request and validates the ID token ' s signature . @return @throws Exception
@Bean
    public JWTSigningAndValidationService createSigningService() throws Exception {
        DefaultJWTSigningAndValidationService jwtSigningAndValidationService = new DefaultJWTSigningAndValidationService(createKeyStore());
        jwtSigningAndValidationService.setDefaultSignerKeyId(signingKeyId);
        jwtSigningAndValidationService.setDefaultSigningAlgorithmName(JWSAlgorithm.RS512.getName());
        return jwtSigningAndValidationService;
    }
@ Bean public JWTSigningAndValidationService createSigningService ( ) throws Exception { DefaultJWTSigningAndValidationService jwtSigningAndValidationService = new DefaultJWTSigningAndValidationService ( createKeyStore ( ) ) ; jwtSigningAndValidationService . setDefaultSignerKeyId ( signingKeyId ) ; jwtSigningAndValidationService . setDefaultSigningAlgorithmName ( JWSAlgorithm . RS512 . getName ( ) ) ; return jwtSigningAndValidationService ; }
This creates the services that signs the outgoing request and validates
 the ID token's signature.
This creates the services that signs the outgoing request and validates the ID token ' s signature .