You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Ignasi Barrera <no...@github.com> on 2016/04/01 10:22:33 UTC

Re: [jclouds/jclouds] Add support for Azure AD authentication using Service Principal (#941)

> +        @Inject AuthorizeToken(AuthorizationApi api) {
> +            this.api = api;
> +        }
> +
> +        @Override public Token load(ClientSecret key) throws Exception {
> +            return api.authorizeClientSecret(key.clientId(), key.clientSecret(), key.resource(), key.scope());
> +        }
> +    }
> +
> +    @Override public HttpRequest filter(HttpRequest request) throws HttpException {
> +        long now = currentTimeSeconds();
> +        ClientSecret client = ClientSecret.create(
> +                credentialsSupplier.get().identity,
> +                credentialsSupplier.get().credential,
> +                resource == null ? "" : resource,
> +                ON_SPACE.join(scopes.forRequest(request)),

Take care of the NPE here. The scopes variable likely to be `null` in Azure.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/941/files/b3f576f0a5d781596fe0788c29d00c2d71a17037#r58175511