Skip to content

Commit

Permalink
Merge pull request #21 from rubenCodeforges/feature/update-repo-name
Browse files Browse the repository at this point in the history
Changed the urls for the new repo name
  • Loading branch information
rubenCodeforges authored Sep 27, 2017
2 parents bc8ada8 + 01d2c92 commit fa0db11
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 17 deletions.
62 changes: 50 additions & 12 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,61 @@ and set the configuration.
##### ClientConfig interface
Bellow are all available parameters that can be provided in the `forRoot()` method.
```typescript
interface ClientConfig {
clientId: string;
export interface NgGapiClientConfig extends ClientConfig {
discoveryDocs: string[];
scope: string;
ux_mode?: string;
fetch_basic_profile?: boolean;
}


//And the extended ClientConfig
interface ClientConfig {
/**
* The app's client ID, found and created in the Google Developers Console.
*/
client_id?: string;

/**
* The domains for which to create sign-in cookies. Either a URI, single_host_origin, or none.
* Defaults to single_host_origin if unspecified.
*/
cookie_policy?: string;

/**
* The scopes to request, as a space-delimited string. Optional if fetch_basic_profile is not set to false.
*/
scope?: string;

/**
* Fetch users' basic profile information when they sign in. Adds 'profile' and 'email' to the requested scopes. True if unspecified.
*/
fetch_basic_profile?: boolean;

/**
* The Google Apps domain to which users must belong to sign in. This is susceptible to modification by clients,
* so be sure to verify the hosted domain property of the returned user. Use GoogleUser.getHostedDomain() on the client,
* and the hd claim in the ID Token on the server to verify the domain is what you expected.
*/
hosted_domain?: string;

/**
* Used only for OpenID 2.0 client migration. Set to the value of the realm that you are currently using for OpenID 2.0,
* as described in <a href="https://developers.google.com/accounts/docs/OpenID#openid-connect">OpenID 2.0 (Migration)</a>.
*/
openid_realm?: string;

/**
* The UX mode to use for the sign-in flow.
* By default, it will open the consent flow in a popup.
*/
ux_mode?: "popup" | "redirect";

/**
* If using ux_mode='redirect', this parameter allows you to override the default redirect_uri that will be used at the end of the consent flow.
* The default redirect_uri is the current URL stripped of query parameters and hash fragment.
*/
redirect_uri?: string;
}
}
```

##### Example:
```typescript
let gapiClientConfig: NgGapiClientConfig = {
Expand Down Expand Up @@ -148,12 +192,6 @@ Configure them according your google app configurations and resource scope.
[Reporting API v4](https://developers.google.com/analytics/devguides/reporting/core/v4/rest/)
- The scope is also in the documentation of the specific API , example for [Reporting API v4](https://developers.google.com/analytics/devguides/reporting/core/v4/rest/v4/reports/batchGet#authorization)

#### Examples

The examples can be used as modules , you need a basic Angular2 project , then add the example module to your projects folder
and import the exampleModule in your AppModule

- ng-gapi [Reporting API v4 example](https://github.com/rubenCodeforges/angular2-google-api/tree/master/examples)


#### Promotion
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ng-gapi",
"version": "0.0.43",
"description": "Angular 4 Google api module ng-gapi",
"version": "0.0.44",
"description": "Angular 4+ Google api module ng-gapi",
"main": "./lib/index.js",
"typings": "./lib/index.d.ts",
"scripts": {
Expand All @@ -10,7 +10,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/rubenCodeforges/angular2-google-api.git"
"url": "git+https://github.com/rubenCodeforges/ng-gapi"
},
"keywords": [
"Angular2",
Expand All @@ -28,9 +28,9 @@
"author": "Ruben M",
"license": "MIT",
"bugs": {
"url": "https://github.com/rubenCodeforges/angular2-google-api/issues"
"url": "https://github.com/rubenCodeforges/ng-gapi/issues"
},
"homepage": "https://github.com/rubenCodeforges/angular2-google-api#readme",
"homepage": "https://github.com/rubenCodeforges/ng-gapi#readme",
"dependencies": {
"@types/gapi": "^0.0.35",
"@types/gapi.auth2": "^0.0.44"
Expand Down

0 comments on commit fa0db11

Please sign in to comment.