Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
@Bean
ClientRegistrationclientRegistration() {
    returnClientRegistration.withRegistrationId("someId")
        .clientId("someClientId")
        .clientSecret("someClientSecret")
        .tokenUri("https://somehost.com/token")
        .authorizationGrantType("client_credentials"AuthorizationGrantType.CLIENT_CREDENTIALS)
        .build();
}

[4] Om angiven (användarnamn och lösenord) sätts Basic-autentisering upp.
[5] Anger connect timeout. Default-värde är 10 sekunder.
[6] Anger read timeout. Default-värde är 60 sekunder.
[7] Skapar själva REST-klienten.